diff --git a/docs.json b/docs.json
index 906e189a1d..28f2995204 100644
--- a/docs.json
+++ b/docs.json
@@ -951,25 +951,14 @@
{
"group": "Python SDK",
"pages": [
- "weave/reference/python-sdk",
{
- "group": "Core",
+ "group": "Other",
"pages": [
"weave/reference/python-sdk/trace/feedback",
"weave/reference/python-sdk/trace/op",
"weave/reference/python-sdk/trace/util",
- "weave/reference/python-sdk/trace/weave_client"
- ]
- },
- {
- "group": "Trace Server",
- "pages": [
- "weave/reference/python-sdk/trace_server/trace_server_interface"
- ]
- },
- {
- "group": "Trace Server Bindings",
- "pages": [
+ "weave/reference/python-sdk/trace/weave_client",
+ "weave/reference/python-sdk/trace_server/trace_server_interface",
"weave/reference/python-sdk/trace_server_bindings/remote_http_trace_server"
]
}
@@ -978,7 +967,6 @@
{
"group": "TypeScript SDK",
"pages": [
- "weave/reference/typescript-sdk",
{
"group": "Classes",
"pages": [
@@ -986,6 +974,7 @@
"weave/reference/typescript-sdk/classes/Evaluation",
"weave/reference/typescript-sdk/classes/EvaluationLogger",
"weave/reference/typescript-sdk/classes/MessagesPrompt",
+ "weave/reference/typescript-sdk/classes/ObjectRef",
"weave/reference/typescript-sdk/classes/ScoreLogger",
"weave/reference/typescript-sdk/classes/StringPrompt",
"weave/reference/typescript-sdk/classes/WeaveClient",
@@ -1028,10 +1017,7 @@
"pages": [
"weave/reference/service-api"
],
- "openapi": {
- "source": "weave/reference/service-api/openapi.json",
- "directory": "weave/reference/service-api"
- }
+ "openapi": "https://raw.githubusercontent.com/wandb/weave/v0.52.16/sdks/node/weave.openapi.json"
}
]
},
@@ -2317,7 +2303,7 @@
{
"source": "/guides/integrations/pytorch",
"destination": "/models/integrations"
- },
+ },
{
"source": "/guides/launch/:slug*",
"destination": "/platform/launch/:slug*"
@@ -2504,4 +2490,4 @@
}
],
"baseUrl": "https://docs.wandb.ai"
-}
+}
\ No newline at end of file
diff --git a/models/ref/python/public-api/artifactcollection.mdx b/models/ref/python/public-api/ArtifactCollection.mdx
similarity index 100%
rename from models/ref/python/public-api/artifactcollection.mdx
rename to models/ref/python/public-api/ArtifactCollection.mdx
diff --git a/models/ref/python/public-api/artifactcollections.mdx b/models/ref/python/public-api/ArtifactCollections.mdx
similarity index 100%
rename from models/ref/python/public-api/artifactcollections.mdx
rename to models/ref/python/public-api/ArtifactCollections.mdx
diff --git a/models/ref/python/public-api/artifactfiles.mdx b/models/ref/python/public-api/ArtifactFiles.mdx
similarity index 100%
rename from models/ref/python/public-api/artifactfiles.mdx
rename to models/ref/python/public-api/ArtifactFiles.mdx
diff --git a/models/ref/python/public-api/artifacttype.mdx b/models/ref/python/public-api/ArtifactType.mdx
similarity index 100%
rename from models/ref/python/public-api/artifacttype.mdx
rename to models/ref/python/public-api/ArtifactType.mdx
diff --git a/models/ref/python/public-api/artifacttypes.mdx b/models/ref/python/public-api/ArtifactTypes.mdx
similarity index 100%
rename from models/ref/python/public-api/artifacttypes.mdx
rename to models/ref/python/public-api/ArtifactTypes.mdx
diff --git a/models/ref/python/public-api/betareport.mdx b/models/ref/python/public-api/BetaReport.mdx
similarity index 100%
rename from models/ref/python/public-api/betareport.mdx
rename to models/ref/python/public-api/BetaReport.mdx
diff --git a/models/ref/python/public-api/file.mdx b/models/ref/python/public-api/File.mdx
similarity index 100%
rename from models/ref/python/public-api/file.mdx
rename to models/ref/python/public-api/File.mdx
diff --git a/models/ref/python/public-api/member.mdx b/models/ref/python/public-api/Member.mdx
similarity index 100%
rename from models/ref/python/public-api/member.mdx
rename to models/ref/python/public-api/Member.mdx
diff --git a/models/ref/python/public-api/project.mdx b/models/ref/python/public-api/Project.mdx
similarity index 100%
rename from models/ref/python/public-api/project.mdx
rename to models/ref/python/public-api/Project.mdx
diff --git a/models/ref/python/public-api/registry.mdx b/models/ref/python/public-api/Registry.mdx
similarity index 100%
rename from models/ref/python/public-api/registry.mdx
rename to models/ref/python/public-api/Registry.mdx
diff --git a/models/ref/python/public-api/run.mdx b/models/ref/python/public-api/Run.mdx
similarity index 100%
rename from models/ref/python/public-api/run.mdx
rename to models/ref/python/public-api/Run.mdx
diff --git a/models/ref/python/public-api/runartifacts.mdx b/models/ref/python/public-api/RunArtifacts.mdx
similarity index 100%
rename from models/ref/python/public-api/runartifacts.mdx
rename to models/ref/python/public-api/RunArtifacts.mdx
diff --git a/models/ref/python/public-api/sweep.mdx b/models/ref/python/public-api/Sweep.mdx
similarity index 100%
rename from models/ref/python/public-api/sweep.mdx
rename to models/ref/python/public-api/Sweep.mdx
diff --git a/models/ref/python/public-api/team.mdx b/models/ref/python/public-api/Team.mdx
similarity index 100%
rename from models/ref/python/public-api/team.mdx
rename to models/ref/python/public-api/Team.mdx
diff --git a/models/ref/python/public-api/user.mdx b/models/ref/python/public-api/User.mdx
similarity index 100%
rename from models/ref/python/public-api/user.mdx
rename to models/ref/python/public-api/User.mdx
diff --git a/weave/reference/python-sdk.mdx b/weave/reference/python-sdk.mdx
index 2949788cdf..1e0515db8e 100644
--- a/weave/reference/python-sdk.mdx
+++ b/weave/reference/python-sdk.mdx
@@ -6,2068 +6,3 @@ description: "Python SDK reference for weave"
# API Overview
----
-
-
-
-### function `init`
-
-```python
-init(
- project_name: 'str',
- settings: 'UserSettings | dict[str, Any] | None' = None,
- autopatch_settings: 'AutopatchSettings | None' = None,
- global_postprocess_inputs: 'PostprocessInputsFunc | None' = None,
- global_postprocess_output: 'PostprocessOutputFunc | None' = None,
- global_attributes: 'dict[str, Any] | None' = None
-) → WeaveClient
-```
-
-Initialize weave tracking, logging to a wandb project.
-
-Logging is initialized globally, so you do not need to keep a reference to the return value of init.
-
-Following init, calls of weave.op() decorated functions will be logged to the specified project.
-
-**Args:**
-
-
-NOTE: Global postprocessing settings are applied to all ops after each op's own postprocessing. The order is always: 1. Op-specific postprocessing 2. Global postprocessing
-
- - `project_name` : The name of the Weights & Biases team and project to log to. If you don't specify a team, your default entity is used. To find or update your default entity, refer to [User Settings](https://docs.wandb.ai/guides/models/app/settings-page/user-settings/#default-team) in the W&B Models documentation.
- - `settings` : Configuration for the Weave client generally.
- - `autopatch_settings` : (Deprecated) Configuration for autopatch integrations. Use explicit patching instead.
- - `global_postprocess_inputs` : A function that will be applied to all inputs of all ops.
- - `global_postprocess_output` : A function that will be applied to all outputs of all ops.
- - `global_attributes` : A dictionary of attributes that will be applied to all traces.
-**Returns:**
- A Weave client.
-
----
-
-
-
-### function `publish`
-
-```python
-publish(obj: 'Any', name: 'str | None' = None) → ObjectRef
-```
-
-Save and version a Python object.
-
-Weave creates a new version of the object if the object's name already exists and its content hash does not match the latest version of that object.
-
-**Args:**
-
-
- - `obj` : The object to save and version.
- - `name` : The name to save the object under.
-**Returns:**
- A Weave Ref to the saved object.
-
----
-
-
-
-### function `ref`
-
-```python
-ref(location: 'str') → ObjectRef
-```
-
-Creates a Ref to an existing Weave object. This does not directly retrieve the object but allows you to pass it to other Weave API functions.
-
-**Args:**
-
-
- - `location` : A Weave Ref URI, or if `weave.init()` has been called, `name:version` or `name`. If no version is provided, `latest` is used.
-**Returns:**
- A Weave Ref to the object.
-
----
-
-
-
-### function `get`
-
-```python
-get(uri: 'str | ObjectRef') → Any
-```
-
-A convenience function for getting an object from a URI.
-
-Many objects logged by Weave are automatically registered with the Weave server. This function allows you to retrieve those objects by their URI.
-
-**Args:**
-
-
- - `uri` : A fully-qualified weave ref URI.
-**Returns:**
- The object.
-
-**Example:**
-```python
-weave.init("weave_get_example")
-dataset = weave.Dataset(rows=[{"a": 1, "b": 2}])
-ref = weave.publish(dataset)
-
-dataset2 = weave.get(ref) # same as dataset!
-```
-
----
-
-
-
-### function `require_current_call`
-
-```python
-require_current_call() → Call
-```
-
-Get the Call object for the currently executing Op, within that Op.
-
-This allows you to access attributes of the Call such as its id or feedback while it is running.
-
-```python
-@weave.op
-def hello(name: str) -> None:
- print(f"Hello {name}!")
- current_call = weave.require_current_call()
- print(current_call.id)
-```
-
-It is also possible to access a Call after the Op has returned.
-
-If you have the Call's id, perhaps from the UI, you can use the `get_call` method on the `WeaveClient` returned from `weave.init` to retrieve the Call object.
-
-```python
-client = weave.init("")
-mycall = client.get_call("")
-```
-
-Alternately, after defining your Op you can use its `call` method. For example:
-
-```python
-@weave.op
-def add(a: int, b: int) -> int:
- return a + b
-
-result, call = add.call(1, 2)
-print(call.id)
-```
-
-**Returns:**
- The Call object for the currently executing Op
-
-**Raises:**
-
- - `NoCurrentCallError` : If tracking has not been initialized or this method is invoked outside an Op.
-
----
-
-
-
-### function `get_current_call`
-
-```python
-get_current_call() → Call | None
-```
-
-Get the Call object for the currently executing Op, within that Op.
-
-**Returns:**
- The Call object for the currently executing Op, or None if tracking has not been initialized or this method is invoked outside an Op.
-
-**Note:**
-
-> The returned Call's ``attributes`` dictionary becomes immutable once the call starts. Use :func:`weave.attributes` to set call metadata before invoking an Op. The ``summary`` field may be updated while the Op executes and will be merged with computed summary information when the call finishes.
-
----
-
-
-
-### function `finish`
-
-```python
-finish() → None
-```
-
-Stops logging to weave.
-
-Following finish, calls of weave.op() decorated functions will no longer be logged. You will need to run weave.init() again to resume logging.
-
----
-
-
-
-### function `op`
-
-```python
-op(
- func: 'Callable[P, R] | None' = None,
- name: 'str | None' = None,
- call_display_name: 'str | CallDisplayNameFunc | None' = None,
- postprocess_inputs: 'PostprocessInputsFunc | None' = None,
- postprocess_output: 'PostprocessOutputFunc | None' = None,
- tracing_sample_rate: 'float' = 1.0,
- enable_code_capture: 'bool' = True,
- accumulator: 'Callable[[Any | None, Any], Any] | None' = None
-) → Callable[[Callable[P, R]], Op[P, R]] | Op[P, R]
-```
-
-A decorator to weave op-ify a function or method. Works for both sync and async. Automatically detects iterator functions and applies appropriate behavior.
-
----
-
-
-
-### function `attributes`
-
-```python
-attributes(attributes: 'dict[str, Any]') → Iterator
-```
-
-Context manager for setting attributes on a call.
-
-**Example:**
-```python
-with weave.attributes({'env': 'production'}):
- print(my_function.call("World"))
-```
-
----
-
-
-
-### function `thread`
-
-```python
-thread(
- thread_id: 'str | None | object' =
-) → Iterator[ThreadContext]
-```
-
-Context manager for setting thread_id on calls within the context.
-
-**Examples:**
-```python
-# Auto-generate thread_id
-with weave.thread() as t:
- print(f"Thread ID: {t.thread_id}")
- result = my_function("input") # This call will have the auto-generated thread_id
- print(f"Current turn: {t.turn_id}")
-
-# Explicit thread_id
-with weave.thread("custom_thread") as t:
- result = my_function("input") # This call will have thread_id="custom_thread"
-
-# Disable threading
-with weave.thread(None) as t:
- result = my_function("input") # This call will have thread_id=None
-```
-
-**Args:**
-
-
- - `thread_id` : The thread identifier to associate with calls in this context. If not provided, a UUID v7 will be auto-generated. If None, thread tracking will be disabled.
-**Yields:**
-
- - `ThreadContext` : An object providing access to thread_id and current turn_id.
-
----
-
-
-
-## class `Object`
-Base class for Weave objects that can be tracked and versioned.
-
-This class extends Pydantic's BaseModel to provide Weave-specific functionality for object tracking, referencing, and serialization. Objects can have names, descriptions, and references that allow them to be stored and retrieved from the Weave system.
-
-**Attributes:**
-
- - `name` (Optional[str]): A human-readable name for the object.
- - `description` (Optional[str]): A description of what the object represents.
- - `ref` (Optional[ObjectRef]): A reference to the object in the Weave system.
-
-**Examples:**
-```python
-# Create a simple object
-obj = Object(name="my_object", description="A test object")
-
-# Create an object from a URI
-obj = Object.from_uri("weave:///entity/project/object:digest")
-```
-
-**Pydantic Fields:**
-
-- `name`: `typing.Optional[str]`
-- `description`: `typing.Optional[str]`
-- `ref`: `typing.Optional[trace.refs.ObjectRef]`
-
----------
-
-
-
-### classmethod `from_uri`
-
-```python
-from_uri(uri: str, objectify: bool = True) → Self
-```
-
-Create an object instance from a Weave URI.
-
-**Args:**
-
- - `uri` (str): The Weave URI pointing to the object.
- - `objectify` (bool): Whether to objectify the result. Defaults to True.
-
-**Returns:**
-
- - `Self` : An instance of the class created from the URI.
-
-**Raises:**
-
- - `NotImplementedError` : If the class doesn't implement the required methods for deserialization.
-
-**Examples:**
-```python
-obj = MyObject.from_uri("weave:///entity/project/object:digest")
-```
-
----
-
-
-
-### classmethod `handle_relocatable_object`
-
-```python
-handle_relocatable_object(
- v: Any,
- handler: ValidatorFunctionWrapHandler,
- info: ValidationInfo
-) → Any
-```
-
-Handle validation of relocatable objects including ObjectRef and WeaveObject.
-
-This validator handles special cases where the input is an ObjectRef or WeaveObject that needs to be properly converted to a standard Object instance. It ensures that references are preserved and that ignored types are handled correctly during the validation process.
-
-**Args:**
-
- - `v` (Any): The value to validate.
- - `handler` (ValidatorFunctionWrapHandler): The standard pydantic validation handler.
- - `info` (ValidationInfo): Validation context information.
-
-**Returns:**
-
- - `Any` : The validated object instance.
-
-**Examples:**
- This method is called automatically during object creation and validation. It handles cases like: ```python
- # When an ObjectRef is passed
- obj = MyObject(some_object_ref)
-
- # When a WeaveObject is passed
- obj = MyObject(some_weave_object)
- ```
-
----
-
-
-
-## class `Dataset`
-Dataset object with easy saving and automatic versioning.
-
-**Examples:**
-```python
-# Create a dataset
-dataset = Dataset(name='grammar', rows=[
- {'id': '0', 'sentence': "He no likes ice cream.", 'correction': "He doesn't like ice cream."},
- {'id': '1', 'sentence': "She goed to the store.", 'correction': "She went to the store."},
- {'id': '2', 'sentence': "They plays video games all day.", 'correction': "They play video games all day."}
-])
-
-# Publish the dataset
-weave.publish(dataset)
-
-# Retrieve the dataset
-dataset_ref = weave.ref('grammar').get()
-
-# Access a specific example
-example_label = dataset_ref.rows[2]['sentence']
-```
-
-**Pydantic Fields:**
-
-- `name`: `typing.Optional[str]`
-- `description`: `typing.Optional[str]`
-- `ref`: `typing.Optional[trace.refs.ObjectRef]`
-- `rows`: `typing.Union[trace.table.Table, trace.vals.WeaveTable]`
-
----------
-
-
-
-### method `add_rows`
-
-```python
-add_rows(rows: Iterable[dict]) → Dataset
-```
-
-Create a new dataset version by appending rows to the existing dataset.
-
-This is useful for adding examples to large datasets without having to load the entire dataset into memory.
-
-**Args:**
-
-
- - `rows` : The rows to add to the dataset.
-**Returns:**
- The updated dataset.
-
----
-
-
-
-### classmethod `convert_to_table`
-
-```python
-convert_to_table(rows: Any) → Union[Table, WeaveTable]
-```
-
----
-
-
-
-### classmethod `from_calls`
-
-```python
-from_calls(calls: Iterable[Call]) → Self
-```
-
----
-
-
-
-### classmethod `from_hf`
-
-```python
-from_hf(
- hf_dataset: Union[ForwardRef('HFDataset'), ForwardRef('HFDatasetDict')]
-) → Self
-```
-
----
-
-
-
-### classmethod `from_obj`
-
-```python
-from_obj(obj: WeaveObject) → Self
-```
-
----
-
-
-
-### classmethod `from_pandas`
-
-```python
-from_pandas(df: 'DataFrame') → Self
-```
-
----
-
-
-
-### method `select`
-
-```python
-select(indices: Iterable[int]) → Self
-```
-
-Select rows from the dataset based on the provided indices.
-
-**Args:**
-
-
- - `indices` : An iterable of integer indices specifying which rows to select.
-**Returns:**
- A new Dataset object containing only the selected rows.
-
----
-
-
-
-### method `to_hf`
-
-```python
-to_hf() → HFDataset
-```
-
----
-
-
-
-### method `to_pandas`
-
-```python
-to_pandas() → DataFrame
-```
-
----
-
-
-
-## class `Model`
-Intended to capture a combination of code and data the operates on an input. For example it might call an LLM with a prompt to make a prediction or generate text.
-
-When you change the attributes or the code that defines your model, these changes will be logged and the version will be updated. This ensures that you can compare the predictions across different versions of your model. Use this to iterate on prompts or to try the latest LLM and compare predictions across different settings
-
-**Examples:**
-```python
-class YourModel(Model):
- attribute1: str
- attribute2: int
-
- @weave.op()
- def predict(self, input_data: str) -> dict:
- # Model logic goes here
- prediction = self.attribute1 + ' ' + input_data
- return {'pred': prediction}
-```
-
-**Pydantic Fields:**
-
-- `name`: `typing.Optional[str]`
-- `description`: `typing.Optional[str]`
-- `ref`: `typing.Optional[trace.refs.ObjectRef]`
-
----------
-
-
-
-### method `get_infer_method`
-
-```python
-get_infer_method() → Callable
-```
-
----
-
-
-
-## class `Prompt`
-
-**Pydantic Fields:**
-
-- `name`: `typing.Optional[str]`
-- `description`: `typing.Optional[str]`
-- `ref`: `typing.Optional[trace.refs.ObjectRef]`
-
----------
-
-
-
-### method `format`
-
-```python
-format(**kwargs: Any) → Any
-```
-
----
-
-
-
-## class `StringPrompt`
-
-
-
-### method `__init__`
-
-```python
-__init__(content: str)
-```
-
-**Pydantic Fields:**
-
-- `name`: `typing.Optional[str]`
-- `description`: `typing.Optional[str]`
-- `ref`: `typing.Optional[trace.refs.ObjectRef]`
-- `content`: ``
-
----------
-
-
-
-### method `format`
-
-```python
-format(**kwargs: Any) → str
-```
-
----
-
-
-
-### classmethod `from_obj`
-
-```python
-from_obj(obj: WeaveObject) → Self
-```
-
----
-
-
-
-## class `MessagesPrompt`
-
-
-
-### method `__init__`
-
-```python
-__init__(messages: list[dict])
-```
-
-**Pydantic Fields:**
-
-- `name`: `typing.Optional[str]`
-- `description`: `typing.Optional[str]`
-- `ref`: `typing.Optional[trace.refs.ObjectRef]`
-- `messages`: `list[dict]`
-
----------
-
-
-
-### method `format`
-
-```python
-format(**kwargs: Any) → list
-```
-
----
-
-
-
-### method `format_message`
-
-```python
-format_message(message: dict, **kwargs: Any) → dict
-```
-
----
-
-
-
-### classmethod `from_obj`
-
-```python
-from_obj(obj: WeaveObject) → Self
-```
-
----
-
-
-
-## class `Evaluation`
-Sets up an evaluation which includes a set of scorers and a dataset.
-
-Calling evaluation.evaluate(model) will pass in rows from a dataset into a model matching the names of the columns of the dataset to the argument names in model.predict.
-
-Then it will call all of the scorers and save the results in weave.
-
-If you want to preprocess the rows from the dataset you can pass in a function to preprocess_model_input.
-
-**Examples:**
-```python
-# Collect your examples
-examples = [
- {"question": "What is the capital of France?", "expected": "Paris"},
- {"question": "Who wrote 'To Kill a Mockingbird'?", "expected": "Harper Lee"},
- {"question": "What is the square root of 64?", "expected": "8"},
-]
-
-# Define any custom scoring function
-@weave.op()
-def match_score1(expected: str, model_output: dict) -> dict:
- # Here is where you'd define the logic to score the model output
- return {'match': expected == model_output['generated_text']}
-
-@weave.op()
-def function_to_evaluate(question: str):
- # here's where you would add your LLM call and return the output
- return {'generated_text': 'Paris'}
-
-# Score your examples using scoring functions
-evaluation = Evaluation(
- dataset=examples, scorers=[match_score1]
-)
-
-# Start tracking the evaluation
-weave.init('intro-example')
-# Run the evaluation
-asyncio.run(evaluation.evaluate(function_to_evaluate))
-```
-
-**Pydantic Fields:**
-
-- `name`: `typing.Optional[str]`
-- `description`: `typing.Optional[str]`
-- `ref`: `typing.Optional[trace.refs.ObjectRef]`
-- `dataset`: ``
-- `scorers`: `typing.Optional[list[typing.Annotated[typing.Union[trace.op_protocol.Op, flow.scorer.Scorer], BeforeValidator(func=, json_schema_input_type=PydanticUndefined)]]]`
-- `preprocess_model_input`: `typing.Optional[typing.Callable[[dict], dict]]`
-- `trials`: ``
-- `metadata`: `typing.Optional[dict[str, typing.Any]]`
-- `evaluation_name`: `typing.Union[str, typing.Callable[[trace.call.Call], str], NoneType]`
-
----------
-
-
-
-### method `evaluate`
-
-```python
-evaluate(model: Union[Op, Model]) → dict
-```
-
----
-
-
-
-### classmethod `from_obj`
-
-```python
-from_obj(obj: WeaveObject) → Self
-```
-
----
-
-
-
-### method `get_eval_results`
-
-```python
-get_eval_results(model: Union[Op, Model]) → EvaluationResults
-```
-
----
-
-
-
-### method `get_evaluate_calls`
-
-```python
-get_evaluate_calls() → PaginatedIterator[CallSchema, WeaveObject]
-```
-
-Retrieve all evaluation calls that used this Evaluation object.
-
-Note that this returns a CallsIter instead of a single call because it's possible to have multiple evaluation calls for a single evaluation (e.g. if you run the same evaluation multiple times).
-
-**Returns:**
-
- - `CallsIter` : An iterator over Call objects representing evaluation runs.
-
-**Raises:**
-
- - `ValueError` : If the evaluation has no ref (hasn't been saved/run yet).
-
-**Examples:**
-```python
-evaluation = Evaluation(dataset=examples, scorers=[scorer])
-await evaluation.evaluate(model) # Run evaluation first
-calls = evaluation.get_evaluate_calls()
-for call in calls:
- print(f"Evaluation run: {call.id} at {call.started_at}")
-```
-
----
-
-
-
-### method `get_score_calls`
-
-```python
-get_score_calls() → dict[str, list[Call]]
-```
-
-Retrieve scorer calls for each evaluation run, grouped by trace ID.
-
-**Returns:**
-
- - `dict[str, list[Call]]` : A dictionary mapping trace IDs to lists of scorer Call objects. Each trace ID represents one evaluation run, and the list contains all scorer calls executed during that run.
-
-**Examples:**
-```python
-evaluation = Evaluation(dataset=examples, scorers=[accuracy_scorer, f1_scorer])
-await evaluation.evaluate(model)
-score_calls = evaluation.get_score_calls()
-for trace_id, calls in score_calls.items():
- print(f"Trace {trace_id}: {len(calls)} scorer calls")
- for call in calls:
- scorer_name = call.summary.get("weave", {}).get("trace_name")
- print(f" Scorer: {scorer_name}, Output: {call.output}")
-```
-
----
-
-
-
-### method `get_scores`
-
-```python
-get_scores() → dict[str, dict[str, list[Any]]]
-```
-
-Extract and organize scorer outputs from evaluation runs.
-
-**Returns:**
-
- - `dict[str, dict[str, list[Any]]]` : A nested dictionary structure where:
- - First level keys are trace IDs (evaluation runs)
- - Second level keys are scorer names
- - Values are lists of scorer outputs for that run and scorer
-
-**Examples:**
-```python
-evaluation = Evaluation(dataset=examples, scorers=[accuracy_scorer, f1_scorer])
-await evaluation.evaluate(model)
-scores = evaluation.get_scores()
-# Access scores by trace and scorer
-for trace_id, trace_scores in scores.items():
- print(f"Evaluation run {trace_id}:")
- for scorer_name, outputs in trace_scores.items():
- print(f" {scorer_name}: {outputs}")
-```
-
-Expected output:
-
-```
-{
- "trace_123": {
- "accuracy_scorer": [{"accuracy": 0.85}],
- "f1_scorer": [{"f1": 0.78}]
- }
-}
-```
-
----
-
-
-
-### method `model_post_init`
-
-```python
-model_post_init(_Evaluation__context: Any) → None
-```
-
----
-
-
-
-### method `predict_and_score`
-
-```python
-predict_and_score(model: Union[Op, Model], example: dict) → dict
-```
-
----
-
-
-
-### method `summarize`
-
-```python
-summarize(eval_table: EvaluationResults) → dict
-```
-
----
-
-
-
-## class `EvaluationLogger`
-This class provides an imperative interface for logging evaluations.
-
-An evaluation is started automatically when the first prediction is logged using the `log_prediction` method, and finished when the `log_summary` method is called.
-
-Each time you log a prediction, you will get back a `ScoreLogger` object. You can use this object to log scores and metadata for that specific prediction. For more information, see the `ScoreLogger` class.
-
-Basic usage - log predictions with inputs and outputs directly:
-
-```python
-ev = EvaluationLogger()
-
-# Log predictions with known inputs/outputs
-pred = ev.log_prediction(inputs={'q': 'Hello'}, outputs={'a': 'Hi there!'})
-pred.log_score("correctness", 0.9)
-
-# Finish the evaluation
-ev.log_summary({"avg_score": 0.9})
-```
-
-Advanced usage - use context manager for dynamic outputs and nested operations:
-
-```python
-ev = EvaluationLogger()
-
-# Use context manager when you need to capture nested operations
-with ev.log_prediction(inputs={'q': 'Hello'}) as pred:
- # Any operations here (like LLM calls) automatically become
- # children of the predict call
- response = your_llm_call(...)
- pred.output = response.content
- pred.log_score("correctness", 0.9)
-
-# Finish the evaluation
-ev.log_summary({"avg_score": 0.9})
-```
-
-**Pydantic Fields:**
-
-- `name`: `str | None`
-- `model`: `flow.model.Model | dict | str`
-- `dataset`: `dataset.dataset.Dataset | list[dict] | str`
-- `eval_attributes`: `dict[str, typing.Any]`
-- `scorers`: `list[str] | None`
-
----
-
-#### property attributes
-
----------
-
-#### property ui_url
-
----
-
-
-
-### method `fail`
-
-```python
-fail(exception: 'BaseException') → None
-```
-
-Convenience method to fail the evaluation with an exception.
-
----
-
-
-
-### method `finish`
-
-```python
-finish(exception: 'BaseException | None' = None) → None
-```
-
-Clean up the evaluation resources explicitly without logging a summary.
-
-Ensures all prediction calls and the main evaluation call are finalized. This is automatically called if the logger is used as a context manager.
-
----
-
-
-
-### method `log_prediction`
-
-```python
-log_prediction(
- inputs: 'dict[str, Any]',
- output: 'Any | _NotSetType' =
-) → ScoreLogger | _LogPredictionContext
-```
-
-Log a prediction to the Evaluation.
-
-If output is provided, returns a ScoreLogger for direct use. If output is not provided, returns a PredictionContext for use as a context manager.
-
-**Args:**
-
-
- - `inputs` : The input data for the prediction
- - `output` : The output value. If not provided, use as context manager to set later.
-**Returns:**
- ScoreLogger if output provided, PredictionContext if not.
-
-Example (direct):
- - `pred = ev.log_prediction({'q'` : '...'}, output="answer") pred.log_score("correctness", 0.9) pred.finish()
-
-Example (context manager):
- - `with ev.log_prediction({'q'` : '...'}) as pred: response = model(...) pred.output = response pred.log_score("correctness", 0.9)
-
----
-
-
-
-### method `log_summary`
-
-```python
-log_summary(summary: 'dict | None' = None, auto_summarize: 'bool' = True) → None
-```
-
-Log a summary dict to the Evaluation.
-
-This will calculate the summary, call the summarize op, and then finalize the evaluation, meaning no more predictions or scores can be logged.
-
----
-
-
-
-### method `model_post_init`
-
-```python
-model_post_init(_EvaluationLogger__context: 'Any') → None
-```
-
-Initialize the pseudo evaluation with the dataset from the model.
-
----
-
-
-
-### method `set_view`
-
-```python
-set_view(
- name: 'str',
- content: 'Content | str',
- extension: 'str | None' = None,
- mimetype: 'str | None' = None,
- metadata: 'dict[str, Any] | None' = None,
- encoding: 'str' = 'utf-8'
-) → None
-```
-
-Attach a view to the evaluation's main call summary under `weave.views`.
-
-Saves the provided content as an object in the project and writes its reference URI under `summary.weave.views.` for the evaluation's `evaluate` call. String inputs are wrapped as text content using `Content.from_text` with the provided extension or mimetype.
-
-**Args:**
-
-
- - `name` : The view name to display, used as the key under `summary.weave.views`.
- - `content` : A `weave.Content` instance or string to serialize.
- - `extension` : Optional file extension for string content inputs.
- - `mimetype` : Optional MIME type for string content inputs.
- - `metadata` : Optional metadata attached to newly created `Content`.
- - `encoding` : Text encoding for string content inputs.
-**Returns:**
- None
-
-**Examples:**
- ``` import weave```
- >>> ev = weave.EvaluationLogger()
- >>> ev.set_view("report", "# Report", extension="md")
-
----
-
-
-
-## class `Scorer`
-
-**Pydantic Fields:**
-
-- `name`: `typing.Optional[str]`
-- `description`: `typing.Optional[str]`
-- `ref`: `typing.Optional[trace.refs.ObjectRef]`
-- `column_map`: `typing.Optional[dict[str, str]]`
-
----------
-
-
-
-### classmethod `from_obj`
-
-```python
-from_obj(obj: WeaveObject) → Self
-```
-
----
-
-
-
-### method `model_post_init`
-
-```python
-model_post_init(_Scorer__context: Any) → None
-```
-
----
-
-
-
-### method `score`
-
-```python
-score(output: Any, **kwargs: Any) → Any
-```
-
----
-
-
-
-### method `summarize`
-
-```python
-summarize(score_rows: list) → Optional[dict]
-```
-
----
-
-
-
-## class `AnnotationSpec`
-
-**Pydantic Fields:**
-
-- `name`: `typing.Optional[str]`
-- `description`: `typing.Optional[str]`
-- `field_schema`: `dict[str, typing.Any]`
-- `unique_among_creators`: ``
-- `op_scope`: `typing.Optional[list[str]]`
-
----------
-
-
-
-### classmethod `preprocess_field_schema`
-
-```python
-preprocess_field_schema(data: dict[str, Any]) → dict[str, Any]
-```
-
----
-
-
-
-### classmethod `validate_field_schema`
-
-```python
-validate_field_schema(schema: dict[str, Any]) → dict[str, Any]
-```
-
----
-
-
-
-### method `value_is_valid`
-
-```python
-value_is_valid(payload: Any) → bool
-```
-
-Validates a payload against this annotation spec's schema.
-
-**Args:**
-
-
- - `payload` : The data to validate against the schema
-**Returns:**
-
- - `bool` : True if validation succeeds, False otherwise
-
----
-
-
-
-## class `File`
-A class representing a file with path, mimetype, and size information.
-
-
-
-### method `__init__`
-
-```python
-__init__(path: 'str | Path', mimetype: 'str | None' = None)
-```
-
-Initialize a File object.
-
-**Args:**
-
-
----
-
-#### property filename
-
-Get the filename of the file.
-
- - `path` : Path to the file (string or pathlib.Path)
- - `mimetype` : Optional MIME type of the file - will be inferred from extension if not provided
-**Returns:**
-
- - `str` : The name of the file without the directory path.
-
----
-
-
-
-### method `open`
-
-```python
-open() → bool
-```
-
-Open the file using the operating system's default application.
-
-This method uses the platform-specific mechanism to open the file with the default application associated with the file's type.
-
-**Returns:**
-
- - `bool` : True if the file was successfully opened, False otherwise.
-
----
-
-
-
-### method `save`
-
-```python
-save(dest: 'str | Path') → None
-```
-
-Copy the file to the specified destination path.
-
-**Args:**
-
-
----
-
-
-
-## class `Content`
-A class to represent content from various sources, resolving them to a unified byte-oriented representation with associated metadata.
-
-This class must be instantiated using one of its classmethods:
-- from_path()
-- from_bytes()
-- from_text()
-- from_url()
-- from_base64()
-- from_data_url()
-
-
-
-### method `__init__`
-
-```python
-__init__(*args: 'Any', **kwargs: 'Any') → None
-```
-
-Direct initialization is disabled. Please use a classmethod like `Content.from_path()` to create an instance.
-
- - `dest` : Destination path where the file will be copied to (string or pathlib.Path) The destination path can be a file or a directory.
-**Pydantic Fields:**
-
-- `data`: ``
-- `size`: ``
-- `mimetype`: ``
-- `digest`: ``
-- `filename`: ``
-- `content_type`: `typing.Literal['bytes', 'text', 'base64', 'file', 'url', 'data_url', 'data_url:base64', 'data_url:encoding', 'data_url:encoding:base64']`
-- `input_type`: ``
-- `encoding`: ``
-- `metadata`: `dict[str, typing.Any] | None`
-- `extension`: `str | None`
-
----
-
-#### property art
-
----------
-
-#### property ref
-
----
-
-
-
-### method `as_string`
-
-```python
-as_string() → str
-```
-
-Display the data as a string. Bytes are decoded using the `encoding` attribute If base64, the data will be re-encoded to base64 bytes then decoded to an ASCII string
-
-**Returns:**
- str.
-
----
-
-
-
-### classmethod `from_base64`
-
-```python
-from_base64(
- b64_data: 'str | bytes',
- extension: 'str | None' = None,
- mimetype: 'str | None' = None,
- metadata: 'dict[str, Any] | None' = None
-) → Self
-```
-
-Initializes Content from a base64 encoded string or bytes.
-
----
-
-
-
-### classmethod `from_bytes`
-
-```python
-from_bytes(
- data: 'bytes',
- extension: 'str | None' = None,
- mimetype: 'str | None' = None,
- metadata: 'dict[str, Any] | None' = None,
- encoding: 'str' = 'utf-8'
-) → Self
-```
-
-Initializes Content from raw bytes.
-
----
-
-
-
-### classmethod `from_data_url`
-
-```python
-from_data_url(url: 'str', metadata: 'dict[str, Any] | None' = None) → Self
-```
-
-Initializes Content from a data URL.
-
----
-
-
-
-### classmethod `from_path`
-
-```python
-from_path(
- path: 'str | Path',
- encoding: 'str' = 'utf-8',
- mimetype: 'str | None' = None,
- metadata: 'dict[str, Any] | None' = None
-) → Self
-```
-
-Initializes Content from a local file path.
-
----
-
-
-
-### classmethod `from_text`
-
-```python
-from_text(
- text: 'str',
- extension: 'str | None' = None,
- mimetype: 'str | None' = None,
- metadata: 'dict[str, Any] | None' = None,
- encoding: 'str' = 'utf-8'
-) → Self
-```
-
-Initializes Content from a string of text.
-
----
-
-
-
-### classmethod `from_url`
-
-```python
-from_url(
- url: 'str',
- headers: 'dict[str, Any] | None' = None,
- timeout: 'int | None' = 30,
- metadata: 'dict[str, Any] | None' = None
-) → Self
-```
-
-Initializes Content by fetching bytes from an HTTP(S) URL.
-
-Downloads the content, infers mimetype/extension from headers, URL path, and data, and constructs a Content object from the resulting bytes.
-
----
-
-
-
-### classmethod `model_validate`
-
-```python
-model_validate(
- obj: 'Any',
- strict: 'bool | None' = None,
- from_attributes: 'bool | None' = None,
- context: 'dict[str, Any] | None' = None
-) → Self
-```
-
-Override model_validate to handle Content reconstruction from dict.
-
----
-
-
-
-### classmethod `model_validate_json`
-
-```python
-model_validate_json(
- json_data: 'str | bytes | bytearray',
- strict: 'bool | None' = None,
- context: 'dict[str, Any] | None' = None
-) → Self
-```
-
-Override model_validate_json to handle Content reconstruction from JSON.
-
----
-
-
-
-### method `open`
-
-```python
-open() → bool
-```
-
-Open the file using the operating system's default application.
-
-This method uses the platform-specific mechanism to open the file with the default application associated with the file's type.
-
-**Returns:**
-
- - `bool` : True if the file was successfully opened, False otherwise.
-
----
-
-
-
-### method `save`
-
-```python
-save(dest: 'str | Path') → None
-```
-
-Copy the file to the specified destination path. Updates the filename and the path of the content to reflect the last saved copy.
-
-**Args:**
-
-
----
-
-
-
-### method `serialize_data`
-
-```python
-serialize_data(data: 'bytes') → str
-```
-
-When dumping model in json mode
-
----
-
-
-
-### method `to_data_url`
-
-```python
-to_data_url(use_base64: 'bool' = True) → str
-```
-
-Constructs a data URL from the content.
-
- - `dest` : Destination path where the file will be copied to (string or pathlib.Path) The destination path can be a file or a directory. If dest has no file extension (e.g. .txt), destination will be considered a directory.
-**Args:**
-
-
- - `use_base64` : If True, the data will be base64 encoded. Otherwise, it will be percent-encoded. Defaults to True.
-**Returns:**
- A data URL string.
-
----
-
-
-
-## class `Markdown`
-A Markdown renderable.
-
-**Args:**
-
- - `markup` (str): A string containing markdown.
- - `code_theme` (str, optional): Pygments theme for code blocks. Defaults to "monokai". See https://pygments.org/styles/ for code themes.
- - `justify` (JustifyMethod, optional): Justify value for paragraphs. Defaults to None.
- - `style` (Union[str, Style], optional): Optional style to apply to markdown.
- - `hyperlinks` (bool, optional): Enable hyperlinks. Defaults to ``True``.
-
-
-
-### method `__init__`
-
-```python
-__init__(
- markup: 'str',
- code_theme: 'str' = 'monokai',
- justify: 'JustifyMethod | None' = None,
- style: 'str | Style' = 'none',
- hyperlinks: 'bool' = True,
- inline_code_lexer: 'str | None' = None,
- inline_code_theme: 'str | None' = None
-) → None
-```
-
----
-
-
-
-## class `Monitor`
-Sets up a monitor to score incoming calls automatically.
-
- - `inline_code_lexer` : (str, optional): Lexer to use if inline code highlighting is enabled. Defaults to None.
- - `inline_code_theme` : (Optional[str], optional): Pygments theme for inline code highlighting, or None for no highlighting. Defaults to None.
-**Examples:**
-```python
-import weave
-from weave.scorers import ValidJSONScorer
-
-json_scorer = ValidJSONScorer()
-
-my_monitor = weave.Monitor(
- name="my-monitor",
- description="This is a test monitor",
- sampling_rate=0.5,
- op_names=["my_op"],
- query={
- "$expr": {
- "$gt": [
- {
- "$getField": "started_at"
- },
- {
- "$literal": 1742540400
- }
- ]
- }
- }
- },
- scorers=[json_scorer],
-)
-
-my_monitor.activate()
-```
-
-**Pydantic Fields:**
-
-- `name`: `typing.Optional[str]`
-- `description`: `typing.Optional[str]`
-- `ref`: `typing.Optional[trace.refs.ObjectRef]`
-- `sampling_rate`: ``
-- `scorers`: `list[flow.scorer.Scorer]`
-- `op_names`: `list[str]`
-- `query`: `typing.Optional[trace_server.interface.query.Query]`
-- `active`: ``
-
----------
-
-
-
-### method `activate`
-
-```python
-activate() → ObjectRef
-```
-
-Activates the monitor.
-
-**Returns:**
- The ref to the monitor.
-
----
-
-
-
-### method `deactivate`
-
-```python
-deactivate() → ObjectRef
-```
-
-Deactivates the monitor.
-
-**Returns:**
- The ref to the monitor.
-
----
-
-
-
-### classmethod `from_obj`
-
-```python
-from_obj(obj: WeaveObject) → Self
-```
-
----
-
-
-
-## class `SavedView`
-A fluent-style class for working with SavedView objects.
-
-
-
-### method `__init__`
-
-```python
-__init__(view_type: 'str' = 'traces', label: 'str' = 'SavedView') → None
-```
-
----
-
-#### property entity
-
----
-
-#### property label
-
----
-
-#### property project
-
----
-
-#### property view_type
-
----
-
-
-
-### method `add_column`
-
-```python
-add_column(path: 'str | ObjectPath', label: 'str | None' = None) → SavedView
-```
-
----
-
-
-
-### method `add_columns`
-
-```python
-add_columns(*columns: 'str') → SavedView
-```
-
-Convenience method for adding multiple columns to the grid.
-
----
-
-
-
-### method `add_filter`
-
-```python
-add_filter(
- field: 'str',
- operator: 'str',
- value: 'Any | None' = None
-) → SavedView
-```
-
----
-
-
-
-### method `add_sort`
-
-```python
-add_sort(field: 'str', direction: 'SortDirection') → SavedView
-```
-
----
-
-
-
-### method `column_index`
-
-```python
-column_index(path: 'int | str | ObjectPath') → int
-```
-
----
-
-
-
-### method `filter_op`
-
-```python
-filter_op(op_name: 'str | None') → SavedView
-```
-
----
-
-
-
-### method `get_calls`
-
-```python
-get_calls(
- limit: 'int | None' = None,
- offset: 'int | None' = None,
- include_costs: 'bool' = False,
- include_feedback: 'bool' = False,
- all_columns: 'bool' = False
-) → CallsIter
-```
-
-Get calls matching this saved view's filters and settings.
-
----
-
-
-
-### method `get_known_columns`
-
-```python
-get_known_columns(num_calls_to_query: 'int | None' = None) → list[str]
-```
-
-Get the set of columns that are known to exist.
-
----
-
-
-
-### method `get_table_columns`
-
-```python
-get_table_columns() → list[TableColumn]
-```
-
----
-
-
-
-### method `hide_column`
-
-```python
-hide_column(col_name: 'str') → SavedView
-```
-
----
-
-
-
-### method `insert_column`
-
-```python
-insert_column(
- idx: 'int',
- path: 'str | ObjectPath',
- label: 'str | None' = None
-) → SavedView
-```
-
----
-
-
-
-### classmethod `load`
-
-```python
-load(ref: 'str') → SavedView
-```
-
----
-
-
-
-### method `page_size`
-
-```python
-page_size(page_size: 'int') → SavedView
-```
-
----
-
-
-
-### method `pin_column_left`
-
-```python
-pin_column_left(col_name: 'str') → SavedView
-```
-
----
-
-
-
-### method `pin_column_right`
-
-```python
-pin_column_right(col_name: 'str') → SavedView
-```
-
----
-
-
-
-### method `remove_column`
-
-```python
-remove_column(path: 'int | str | ObjectPath') → SavedView
-```
-
----
-
-
-
-### method `remove_columns`
-
-```python
-remove_columns(*columns: 'str') → SavedView
-```
-
-Remove columns from the saved view.
-
----
-
-
-
-### method `remove_filter`
-
-```python
-remove_filter(index_or_field: 'int | str') → SavedView
-```
-
----
-
-
-
-### method `remove_filters`
-
-```python
-remove_filters() → SavedView
-```
-
-Remove all filters from the saved view.
-
----
-
-
-
-### method `rename`
-
-```python
-rename(label: 'str') → SavedView
-```
-
----
-
-
-
-### method `rename_column`
-
-```python
-rename_column(path: 'int | str | ObjectPath', label: 'str') → SavedView
-```
-
----
-
-
-
-### method `save`
-
-```python
-save() → SavedView
-```
-
-Publish the saved view to the server.
-
----
-
-
-
-### method `set_columns`
-
-```python
-set_columns(*columns: 'str') → SavedView
-```
-
-Set the columns to be displayed in the grid.
-
----
-
-
-
-### method `show_column`
-
-```python
-show_column(col_name: 'str') → SavedView
-```
-
----
-
-
-
-### method `sort_by`
-
-```python
-sort_by(field: 'str', direction: 'SortDirection') → SavedView
-```
-
----
-
-
-
-### method `to_grid`
-
-```python
-to_grid(limit: 'int | None' = None) → Grid
-```
-
----
-
-
-
-### method `to_rich_table_str`
-
-```python
-to_rich_table_str() → str
-```
-
----
-
-
-
-### method `ui_url`
-
-```python
-ui_url() → str | None
-```
-
-URL to show this saved view in the UI.
-
-Note this is the "result" page with traces etc, not the URL for the view object.
-
----
-
-
-
-### method `unpin_column`
-
-```python
-unpin_column(col_name: 'str') → SavedView
-```
-
----
-
-
-
-## class `Audio`
-A class representing audio data in a supported format (wav or mp3).
-
-This class handles audio data storage and provides methods for loading from different sources and exporting to files.
-
-**Attributes:**
-
- - `format` : The audio format (currently supports 'wav' or 'mp3')
- - `data` : The raw audio data as bytes
-
-**Args:**
-
-
- - `data` : The audio data (bytes or base64 encoded string)
- - `format` : The audio format ('wav' or 'mp3')
- - `validate_base64` : Whether to attempt base64 decoding of the input data
-**Raises:**
-
- - `ValueError` : If audio data is empty or format is not supported
-
-
-
-### method `__init__`
-
-```python
-__init__(
- data: 'bytes',
- format: 'SUPPORTED_FORMATS_TYPE',
- validate_base64: 'bool' = True
-) → None
-```
-
----
-
-
-
-### method `export`
-
-```python
-export(path: 'str | bytes | Path | PathLike') → None
-```
-
-Export audio data to a file.
-
-**Args:**
-
-
----
-
-
-
-### classmethod `from_data`
-
-```python
-from_data(data: 'str | bytes', format: 'str') → Audio
-```
-
-Create an Audio object from raw data and specified format.
-
- - `path` : Path where the audio file should be written
-**Args:**
-
-
- - `data` : Audio data as bytes or base64 encoded string
- - `format` : Audio format ('wav' or 'mp3')
-**Returns:**
-
- - `Audio` : A new Audio instance
-
-**Raises:**
-
- - `ValueError` : If format is not supported
-
----
-
-
-
-### classmethod `from_path`
-
-```python
-from_path(path: 'str | bytes | Path | PathLike') → Audio
-```
-
-Create an Audio object from a file path.
-
-**Args:**
-
-
- - `path` : Path to an audio file (must have .wav or .mp3 extension)
-**Returns:**
-
- - `Audio` : A new Audio instance loaded from the file
-
-**Raises:**
-
- - `ValueError` : If file doesn't exist or has unsupported extension
diff --git a/weave/reference/python-sdk/trace/feedback.mdx b/weave/reference/python-sdk/trace/feedback.mdx
index 2c63b36097..c286d9c40c 100644
--- a/weave/reference/python-sdk/trace/feedback.mdx
+++ b/weave/reference/python-sdk/trace/feedback.mdx
@@ -8,79 +8,77 @@ description: "Python SDK reference for weave.trace.feedback"
---
-
+
-## class `Feedbacks`
-A collection of Feedback objects with utilities.
+## class `FeedbackQuery`
+Lazy-loading object for fetching feedback from the server.
-
+
### method `__init__`
```python
__init__(
- show_refs: 'bool',
- feedbacks: 'Iterable[Feedback] | None' = None
-) → None
+ entity: 'str',
+ project: 'str',
+ query: 'Query',
+ offset: 'int | None' = None,
+ limit: 'int | None' = None,
+ show_refs: 'bool' = False
+)
```
---
-
+
-### method `refs`
+### method `execute`
```python
-refs() → Refs
+execute() → Feedbacks
```
-Return the unique refs associated with these feedbacks.
-
---
-
+
-## class `FeedbackQuery`
-Lazy-loading object for fetching feedback from the server.
-
-
-
-### method `__init__`
+### method `refresh`
```python
-__init__(
- entity: 'str',
- project: 'str',
- query: 'Query',
- offset: 'int | None' = None,
- limit: 'int | None' = None,
- show_refs: 'bool' = False
-)
+refresh() → Feedbacks
```
---
-
+
-### method `execute`
+### method `refs`
```python
-execute() → Feedbacks
+refs() → Refs
```
---
-
+
-### method `refresh`
+## class `Feedbacks`
+A collection of Feedback objects with utilities.
+
+
+
+### method `__init__`
```python
-refresh() → Feedbacks
+__init__(
+ show_refs: 'bool',
+ feedbacks: 'Iterable[Feedback] | None' = None
+) → None
```
---
-
+
### method `refs`
@@ -88,14 +86,16 @@ refresh() → Feedbacks
refs() → Refs
```
+Return the unique refs associated with these feedbacks.
+
---
-
+
## class `RefFeedbackQuery`
Object for interacting with feedback associated with a particular ref.
-
+
### method `__init__`
@@ -105,7 +105,7 @@ __init__(ref: 'str') → None
---
-
+
### method `add`
@@ -125,7 +125,7 @@ feedback_type: A string identifying the type of feedback. The "wandb." prefix is
---
-
+
### method `add_note`
@@ -135,7 +135,7 @@ add_note(note: 'str', creator: 'str | None' = None) → str
---
-
+
### method `add_reaction`
@@ -145,7 +145,7 @@ add_reaction(emoji: 'str', creator: 'str | None' = None) → str
---
-
+
### method `execute`
@@ -155,7 +155,7 @@ execute() → Feedbacks
---
-
+
### method `purge`
@@ -165,7 +165,7 @@ purge(feedback_id: 'str') → None
---
-
+
### method `refresh`
@@ -175,7 +175,7 @@ refresh() → Feedbacks
---
-
+
### method `refs`
diff --git a/weave/reference/python-sdk/trace/op.mdx b/weave/reference/python-sdk/trace/op.mdx
index 8c454c5cd1..0d08bedd9a 100644
--- a/weave/reference/python-sdk/trace/op.mdx
+++ b/weave/reference/python-sdk/trace/op.mdx
@@ -8,7 +8,68 @@ description: "Python SDK reference for weave.trace.op"
---
-
+
+
+## class `DisplayNameFuncError`
+
+---
+
+
+
+## class `OpCallError`
+
+---
+
+
+
+## class `OpKwargs`
+TypedDict for op() keyword arguments.
+
+---
+
+
+
+## class `Sentinel`
+Sentinel(package: 'str', path: 'str', name: 'str')
+
+
+
+### method `__init__`
+
+```python
+__init__(package: 'str', path: 'str', name: 'str') → None
+```
+
+---
+
+
+
+## class `WeaveKwargs`
+
+---
+
+
+
+### function `as_op`
+
+```python
+as_op(fn: 'Callable[P, R]') → Op[P, R]
+```
+
+Given a @weave.op() decorated function, return its Op.
+
+@weave.op() decorated functions are instances of Op already, so this function should be a no-op at runtime. But you can use it to satisfy type checkers if you need to access OpDef attributes in a typesafe way.
+
+**Args:**
+
+
+ - `fn` : A weave.op() decorated function.
+**Returns:**
+ The Op of the function.
+
+---
+
+
### function `call`
@@ -39,7 +100,7 @@ result, call = add.call(1, 2)
---
-
+
### function `calls`
@@ -60,3 +121,135 @@ calls = add.calls()
for call in calls:
print(call)
```
+
+---
+
+
+
+### function `get_captured_code`
+
+```python
+get_captured_code(op: 'Op') → str
+```
+
+Get the captured code of the op.
+
+This only works when you get an op back from a ref. The pattern is:
+
+ref = weave.publish(func) op = ref.get() captured_code = op.get_captured_code()
+
+---
+
+
+
+### function `is_op`
+
+```python
+is_op(obj: 'Any') → TypeIs[Op]
+```
+
+Check if an object is an Op.
+
+---
+
+
+
+### function `is_placeholder_call`
+
+```python
+is_placeholder_call(call: 'Call') → TypeIs[NoOpCall]
+```
+
+---
+
+
+
+### function `is_tracing_setting_disabled`
+
+```python
+is_tracing_setting_disabled() → bool
+```
+
+---
+
+
+
+### function `maybe_bind_method`
+
+```python
+maybe_bind_method(func: 'Callable', self: 'Any' = None) → Callable | MethodType
+```
+
+Bind a function to any object (even if it's not a class).
+
+If self is None, return the function as is.
+
+---
+
+
+
+### function `maybe_unbind_method`
+
+```python
+maybe_unbind_method(oplike: 'Op | MethodType | partial') → Op
+```
+
+Unbind an Op-like method or partial to a plain Op function.
+
+For:
+- methods, remove set `self` param
+- partials, remove any preset params
+
+---
+
+
+
+### function `op`
+
+```python
+op(
+ func: 'Callable[P, R] | None' = None,
+ name: 'str | None' = None,
+ call_display_name: 'str | CallDisplayNameFunc | None' = None,
+ postprocess_inputs: 'PostprocessInputsFunc | None' = None,
+ postprocess_output: 'PostprocessOutputFunc | None' = None,
+ tracing_sample_rate: 'float' = 1.0,
+ enable_code_capture: 'bool' = True,
+ accumulator: 'Callable[[Any | None, Any], Any] | None' = None
+) → Callable[[Callable[P, R]], Op[P, R]] | Op[P, R]
+```
+
+A decorator to weave op-ify a function or method. Works for both sync and async. Automatically detects iterator functions and applies appropriate behavior.
+
+---
+
+
+
+### function `placeholder_call`
+
+```python
+placeholder_call() → Call
+```
+
+---
+
+
+
+### function `setup_dunder_weave_dict`
+
+```python
+setup_dunder_weave_dict(d: 'WeaveKwargs | None' = None) → WeaveKwargs
+```
+
+Sets up a __weave dict used to pass WeaveKwargs to ops.
+
+---
+
+
+
+### function `should_skip_tracing_for_op`
+
+```python
+should_skip_tracing_for_op(op: 'Op') → bool
+```
+
diff --git a/weave/reference/python-sdk/trace/util.mdx b/weave/reference/python-sdk/trace/util.mdx
index e849391cda..1d8da0ae11 100644
--- a/weave/reference/python-sdk/trace/util.mdx
+++ b/weave/reference/python-sdk/trace/util.mdx
@@ -8,7 +8,81 @@ description: "Python SDK reference for weave.trace.util"
---
-
+
+
+## class `ContextAwareThread`
+A Thread that runs functions with the context of the caller.
+
+This is a drop-in replacement for threading.Thread that ensures calls behave as expected inside the thread. Weave requires certain contextvars to be set (see call_context.py), but new threads do not automatically copy context from the parent, which can cause the call context to be lost -- not good! This class automates contextvar copying so using this thread "just works" as the user probably expects.
+
+You can achieve the same effect without this class by instead writing:
+
+```python
+def run_with_context(func, *args, **kwargs):
+ context = copy_context()
+ def wrapper():
+ context.run(func, *args, **kwargs)
+ return wrapper
+
+thread = threading.Thread(target=run_with_context(your_func, *args, **kwargs))
+thread.start()
+```
+
+
+
+### method `__init__`
+
+```python
+__init__(*args: 'Any', **kwargs: 'Any') → None
+```
+
+---
+
+#### property daemon
+
+A boolean value indicating whether this thread is a daemon thread.
+
+This must be set before start() is called, otherwise RuntimeError is raised. Its initial value is inherited from the creating thread; the main thread is not a daemon thread and therefore all threads created in the main thread default to daemon = False.
+
+The entire Python program exits when only daemon threads are left.
+
+---
+
+#### property ident
+
+Thread identifier of this thread or None if it has not been started.
+
+This is a nonzero integer. See the get_ident() function. Thread identifiers may be recycled when a thread exits and another thread is created. The identifier is available even after the thread has exited.
+
+---
+
+#### property name
+
+A string used for identification purposes only.
+
+It has no semantics. Multiple threads may be given the same name. The initial name is set by the constructor.
+
+---
+
+#### property native_id
+
+Native integral thread ID of this thread, or None if it has not been started.
+
+This is a non-negative integer. See the get_native_id() function. This represents the Thread ID as reported by the kernel.
+
+---
+
+
+
+### method `run`
+
+```python
+run() → None
+```
+
+---
+
+
## class `ContextAwareThreadPoolExecutor`
A ThreadPoolExecutor that runs functions with the context of the caller.
@@ -27,7 +101,7 @@ with concurrent.futures.ThreadPoolExecutor() as executor:
executor.map(_wrapped_fn, vals)
```
-
+
### method `__init__`
@@ -37,7 +111,7 @@ __init__(*args: 'Any', **kwargs: 'Any') → None
---
-
+
### method `map`
@@ -52,7 +126,7 @@ map(
---
-
+
### method `submit`
@@ -62,7 +136,7 @@ submit(fn: 'Callable', *args: 'Any', **kwargs: 'Any') → Any
---
-
+
## class `ContextAwareThread`
A Thread that runs functions with the context of the caller.
@@ -82,7 +156,7 @@ thread = threading.Thread(target=run_with_context(your_func, *args, **kwargs))
thread.start()
```
-
+
### method `__init__`
@@ -126,7 +200,7 @@ This is a non-negative integer. See the get_native_id() function. This represent
---
-
+
### method `run`
@@ -134,3 +208,112 @@ This is a non-negative integer. See the get_native_id() function. This represent
run() → None
```
+---
+
+
+
+## class `ContextAwareThreadPoolExecutor`
+A ThreadPoolExecutor that runs functions with the context of the caller.
+
+This is a drop-in replacement for concurrent.futures.ThreadPoolExecutor that ensures weave calls behave as expected inside the executor. Weave requires certain contextvars to be set (see call_context.py), but new threads do not automatically copy context from the parent, which can cause the call context to be lost -- not good! This class automates contextvar copying so using this executor "just works" as the user probably expects.
+
+You can achieve the same effect without this class by instead writing:
+
+```python
+with concurrent.futures.ThreadPoolExecutor() as executor:
+ contexts = [copy_context() for _ in range(len(vals))]
+
+ def _wrapped_fn(*args):
+ return contexts.pop().run(fn, *args)
+
+ executor.map(_wrapped_fn, vals)
+```
+
+
+
+### method `__init__`
+
+```python
+__init__(*args: 'Any', **kwargs: 'Any') → None
+```
+
+---
+
+
+
+### method `map`
+
+```python
+map(
+ fn: 'Callable',
+ *iterables: 'Iterable[Any]',
+ timeout: 'float | None' = None,
+ chunksize: 'int' = 1
+) → Iterator
+```
+
+---
+
+
+
+### method `submit`
+
+```python
+submit(fn: 'Callable', *args: 'Any', **kwargs: 'Any') → Any
+```
+
+---
+
+
+
+### function `deprecated`
+
+```python
+deprecated(new_name: 'str') → Callable[[Callable[, Any]], Callable[, Any]]
+```
+
+Decorator to mark a function as deprecated and redirect users to `new_name`.
+
+---
+
+
+
+### function `is_colab`
+
+```python
+is_colab()
+```
+
+---
+
+
+
+### function `is_notebook`
+
+```python
+is_notebook() → bool
+```
+
+---
+
+
+
+### function `log_once`
+
+```python
+log_once(log_method: 'Callable[[str], None]', message: 'str') → None
+```
+
+Logs a message once, suppressing subsequent messages of the same type. This is useful for notifying the user about errors without spamming the logs.
+
+This is mostly useful for cases where the same error message might occur many times. For example, if an op fails to save, it is likely going to happen every time that op is called. Or, if we have an error in our patched iterator, then it likely happens every time we iterate over the result. This allows use to inform the user about the error without clogging up their logs.
+
+**Args:**
+
+
+ - `log_method` : The method to use to log the message. This should accept a string argument.
+ - `message` : The message to log.
+**Example:**
+```python
+log_once(logger.error, "Failed to save op")
+```
diff --git a/weave/reference/python-sdk/trace/weave_client.mdx b/weave/reference/python-sdk/trace/weave_client.mdx
index 81b55842fd..d2fc0fe4d3 100644
--- a/weave/reference/python-sdk/trace/weave_client.mdx
+++ b/weave/reference/python-sdk/trace/weave_client.mdx
@@ -8,11 +8,25 @@ description: "Python SDK reference for weave.trace.weave_client"
---
-
+
+
+## class `FlushStatus`
+Status information about the current flush operation.
+
+---
+
+
+
+## class `PendingJobCounts`
+Counts of pending jobs for each type.
+
+---
+
+
## class `WeaveClient`
-
+
### method `__init__`
@@ -39,7 +53,7 @@ This property can be used to check the progress of background tasks without bloc
---
-
+
### method `add_cost`
@@ -78,30 +92,30 @@ client.add_cost(llm_id="my_expensive_custom_model", prompt_token_cost=500, compl
---
-
+
-### method `call`
+### method `clear_wandb_run_context`
```python
-call(call_id: 'str', include_costs: 'bool' = False) → WeaveObject
+clear_wandb_run_context() → None
```
----
+Clear wandb run context override.
-
-
-### method `calls`
+After calling this, calls will fall back to using the global wandb.run (if available) for run_id and step information.
+**Examples:**
```python
-calls(
- filter: 'CallsFilter | None' = None,
- include_costs: 'bool' = False
-) → CallsIter
+client = weave.init("my-project")
+client.set_wandb_run_context(run_id="my-run-id", step=5)
+# ... make some calls ...
+client.clear_wandb_run_context()
+# Now calls will use global wandb.run again
```
---
-
+
### method `create_call`
@@ -133,7 +147,7 @@ Create, log, and push a call onto the runtime stack.
---
-
+
### method `delete_all_object_versions`
@@ -152,7 +166,7 @@ Delete all versions of an object.
---
-
+
### method `delete_all_op_versions`
@@ -171,7 +185,7 @@ Delete all versions of an op.
---
-
+
### method `delete_call`
@@ -181,7 +195,7 @@ delete_call(call: 'Call') → None
---
-
+
### method `delete_calls`
@@ -198,7 +212,7 @@ Deleting a call will also delete all of its children.
---
-
+
### method `delete_object_version`
@@ -208,7 +222,7 @@ delete_object_version(object: 'ObjectRef') → None
---
-
+
### method `delete_object_versions`
@@ -229,7 +243,7 @@ Delete specific versions of an object.
---
-
+
### method `delete_op_version`
@@ -239,7 +253,7 @@ delete_op_version(op: 'OpRef') → None
---
-
+
### method `fail_call`
@@ -251,22 +265,7 @@ Fail a call with an exception. This is a convenience method for finish_call.
---
-
-
-### method `feedback`
-
-```python
-feedback(
- query: 'Query | str | None' = None,
- reaction: 'str | None' = None,
- offset: 'int' = 0,
- limit: 'int' = 100
-) → FeedbackQuery
-```
-
----
-
-
+
### method `finish`
@@ -286,7 +285,7 @@ This method blocks until all currently enqueued jobs are processed, displaying a
---
-
+
### method `finish_call`
@@ -305,7 +304,7 @@ Any values present in ``call.summary`` are deep-merged with computed summary sta
---
-
+
### method `flush`
@@ -317,7 +316,7 @@ Flushes background asynchronous tasks, safe to call multiple times.
---
-
+
### method `get`
@@ -327,7 +326,7 @@ get(ref: 'ObjectRef', objectify: 'bool' = True) → Any
---
-
+
### method `get_call`
@@ -356,7 +355,7 @@ Get a single call by its ID.
---
-
+
### method `get_calls`
@@ -413,7 +412,7 @@ for call in calls:
---
-
+
### method `get_evaluation`
@@ -449,7 +448,7 @@ print(evaluation.name)
---
-
+
### method `get_evaluations`
@@ -474,7 +473,7 @@ for eval in evaluations:
---
-
+
### method `get_feedback`
@@ -528,7 +527,7 @@ client.get_feedback(query=query)
---
-
+
### method `purge_costs`
@@ -549,7 +548,7 @@ client.purge_costs(ids)
---
-
+
### method `query_costs`
@@ -588,7 +587,7 @@ client.query_costs(llm_ids=["gpt-4o-mini-2024-07-18"], limit=10)
---
-
+
### method `save`
@@ -609,188 +608,91 @@ Do not call directly, use weave.publish() instead.
---
-
+
-## class `Call`
-A Call represents a single operation executed as part of a trace.
-
-``attributes`` are frozen once the call is created. Use :func:`weave.attributes` or ``create_call(..., attributes=...)`` to populate metadata beforehand. The ``summary`` dictionary may be modified while the call is running; its contents are deep-merged with computed summary values when :meth:`WeaveClient.finish_call` is invoked.
-
-
-
-### method `__init__`
+### method `set_wandb_run_context`
```python
-__init__(
- _op_name: 'str | Future[str]',
- trace_id: 'str',
- project_id: 'str',
- parent_id: 'str | None',
- inputs: 'dict[str, Any]',
- id: 'str | None' = None,
- output: 'Any' = None,
- exception: 'str | None' = None,
- summary: 'dict[str, Any] | None' = <factory>,
- _display_name: 'str | Callable[[Call], str] | None' = None,
- attributes: 'dict[str, Any] | None' = None,
- started_at: 'datetime | None' = None,
- ended_at: 'datetime | None' = None,
- deleted_at: 'datetime | None' = None,
- thread_id: 'str | None' = None,
- turn_id: 'str | None' = None,
- wb_run_id: 'str | None' = None,
- wb_run_step: 'int | None' = None,
- wb_run_step_end: 'int | None' = None,
- _children: 'list[Call]' = <factory>,
- _feedback: 'RefFeedbackQuery | None' = None
-) → None
+set_wandb_run_context(run_id: 'str', step: 'int | None' = None) → None
```
----
-
-#### property display_name
-
----
-
-#### property feedback
-
----
-
-#### property func_name
-
-The decorated function's name that produced this call.
+Override wandb run_id and step for calls created by this client.
-This is different from `op_name` which is usually the ref of the op.
-
----
-
-#### property op_name
-
----
-
-#### property ref
-
----
-
-#### property ui_url
-
----
-
-
-
-### method `apply_scorer`
-
-```python
-apply_scorer(
- scorer: 'Op | Scorer',
- additional_scorer_kwargs: 'dict[str, Any] | None' = None
-) → ApplyScorerResult
-```
-
-`apply_scorer` is a method that applies a Scorer to a Call. This is useful for guarding application logic with a scorer and/or monitoring the quality of critical ops. Scorers are automatically logged to Weave as Feedback and can be used in queries & analysis.
+This allows you to associate Weave calls with a specific WandB run that is not bound to the global wandb.run symbol.
**Args:**
- - `scorer` : The Scorer to apply.
- - `additional_scorer_kwargs` : Additional kwargs to pass to the scorer. This is useful for passing in additional context that is not part of the call inputs.useful for passing in additional context that is not part of the call inputs.
-**Returns:**
- The result of the scorer application in the form of an `ApplyScorerResult`.
-
+ - `run_id` : The run ID (not including entity/project prefix). The client will automatically add the entity/project prefix.
+ - `step` : The step number to use for calls. If None, step will not be set.
+**Examples:**
```python
-class ApplyScorerSuccess:
-
- - ` result` : Any
-
- - ` score_call` : Call
-```
-
-Example usage:
+client = weave.init("my-project")
+client.set_wandb_run_context(run_id="my-run-id", step=5)
+# Now all calls will be associated with entity/project/my-run-id at step 5
-```python
-my_scorer = ... # construct a scorer
-prediction, prediction_call = my_op.call(input_data)
-result, score_call = prediction.apply_scorer(my_scorer)
+# Or without a step
+client.set_wandb_run_context(run_id="my-run-id")
+# Calls will be associated with entity/project/my-run-id with no step
```
---
-
+
-### method `children`
+### function `get_obj_name`
```python
-children(page_size: 'int' = 1000) → CallsIter
+get_obj_name(val: 'Any') → str
```
-Get the children of the call.
-
-**Args:**
-
-
- - `page_size` : Tune performance by changing the number of calls fetched at a time.
-**Returns:**
- An iterator of calls.
-
---
-
+
-### method `delete`
+### function `get_parallelism_settings`
```python
-delete() → bool
+get_parallelism_settings() → tuple[int | None, int | None]
```
-Delete the call.
-
---
-
+
-### method `remove_display_name`
+### function `map_to_refs`
```python
-remove_display_name() → None
+map_to_refs(obj: 'Any') → Any
```
---
-
-
-### method `set_display_name`
-
-```python
-set_display_name(name: 'str | None') → None
-```
-
-Set the display name for the call.
+
-**Args:**
-
+### function `print_call_link`
- - `name` : The display name to set for the call.
-**Example:**
```python
-result, call = my_function.call("World")
-call.set_display_name("My Custom Display Name")
+print_call_link(call: 'Call') → None
```
---
-
+
-### method `to_dict`
+### function `redact_sensitive_keys`
```python
-to_dict() → CallDict
+redact_sensitive_keys(obj: 'Any') → Any
```
---
-### function `PaginatedIterator`
+
+
+### function `sanitize_object_name`
```python
-PaginatedIterator(*args, **kwargs)
+sanitize_object_name(name: 'str') → str
```
diff --git a/weave/reference/python-sdk/trace_server/trace_server_interface.mdx b/weave/reference/python-sdk/trace_server/trace_server_interface.mdx
index 5e86827716..f1374b1d3e 100644
--- a/weave/reference/python-sdk/trace_server/trace_server_interface.mdx
+++ b/weave/reference/python-sdk/trace_server/trace_server_interface.mdx
@@ -8,7 +8,7 @@ description: "Python SDK reference for weave.trace_server.trace_server_interface
---
-
+
## class `ActionsExecuteBatchReq`
@@ -23,7 +23,7 @@ description: "Python SDK reference for weave.trace_server.trace_server_interface
---
-
+
## class `ActionsExecuteBatchRes`
@@ -31,7 +31,7 @@ description: "Python SDK reference for weave.trace_server.trace_server_interface
---
-
+
## class `BaseModelStrict`
Base model with strict validation that forbids extra fields.
@@ -40,7 +40,7 @@ Base model with strict validation that forbids extra fields.
---
-
+
## class `CallBatchEndMode`
@@ -53,7 +53,7 @@ Base model with strict validation that forbids extra fields.
---
-
+
## class `CallBatchStartMode`
@@ -66,7 +66,7 @@ Base model with strict validation that forbids extra fields.
---
-
+
## class `CallCreateBatchReq`
@@ -78,7 +78,7 @@ Base model with strict validation that forbids extra fields.
---
-
+
## class `CallCreateBatchRes`
@@ -90,7 +90,7 @@ Base model with strict validation that forbids extra fields.
---
-
+
## class `CallEndReq`
@@ -102,7 +102,7 @@ Base model with strict validation that forbids extra fields.
---
-
+
## class `CallEndRes`
@@ -110,7 +110,7 @@ Base model with strict validation that forbids extra fields.
---
-
+
## class `CallReadReq`
@@ -126,7 +126,7 @@ Base model with strict validation that forbids extra fields.
---
-
+
## class `CallReadRes`
@@ -138,7 +138,7 @@ Base model with strict validation that forbids extra fields.
---
-
+
## class `CallSchema`
@@ -169,7 +169,7 @@ Base model with strict validation that forbids extra fields.
---------
-
+
### method `serialize_typed_dicts`
@@ -179,7 +179,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CallStartReq`
@@ -191,7 +191,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CallStartRes`
@@ -204,7 +204,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CallUpdateReq`
@@ -219,7 +219,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CallUpdateRes`
@@ -227,7 +227,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CallsDeleteReq`
@@ -241,15 +241,19 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CallsDeleteRes`
+**Pydantic Fields:**
+
+- `num_deleted`: ``
+
------
---
-
+
## class `CallsFilter`
@@ -271,7 +275,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CallsQueryReq`
@@ -295,7 +299,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CallsQueryRes`
@@ -307,7 +311,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CallsQueryStatsReq`
@@ -324,7 +328,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CallsQueryStatsRes`
@@ -337,7 +341,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CompletionsCreateReq`
@@ -352,7 +356,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CompletionsCreateRequestInputs`
@@ -389,7 +393,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CompletionsCreateRes`
@@ -402,7 +406,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CostCreateInput`
@@ -419,7 +423,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CostCreateReq`
@@ -433,7 +437,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CostCreateRes`
@@ -445,7 +449,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CostPurgeReq`
@@ -458,7 +462,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CostPurgeRes`
@@ -466,7 +470,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CostQueryOutput`
@@ -485,7 +489,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CostQueryReq`
@@ -502,7 +506,7 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
## class `CostQueryRes`
@@ -514,817 +518,2698 @@ serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
---
-
+
-## class `EndedCallSchemaForInsert`
+## class `DatasetCreateV2Body`
**Pydantic Fields:**
-- `project_id`: ``
-- `id`: ``
-- `ended_at`: ``
-- `exception`: `typing.Optional[str]`
-- `output`: `typing.Optional[typing.Any]`
-- `summary`: ``
-- `wb_run_step_end`: `typing.Optional[int]`
+- `name`: `typing.Optional[str]`
+- `description`: `typing.Optional[str]`
+- `rows`: `list[dict[str, typing.Any]]`
----------
+------
+
+---
-
+
-### method `serialize_typed_dicts`
+## class `DatasetCreateV2Req`
-```python
-serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
-```
+**Pydantic Fields:**
+
+- `name`: `typing.Optional[str]`
+- `description`: `typing.Optional[str]`
+- `rows`: `list[dict[str, typing.Any]]`
+- `project_id`: ``
+- `wb_user_id`: `typing.Optional[str]`
+
+------
---
-
+
-## class `EnsureProjectExistsRes`
+## class `DatasetCreateV2Res`
**Pydantic Fields:**
-- `project_name`: ``
+- `digest`: ``
+- `object_id`: ``
+- `version_index`: ``
------
---
-
+
-## class `EvaluateModelReq`
+## class `DatasetDeleteV2Req`
**Pydantic Fields:**
- `project_id`: ``
-- `evaluation_ref`: ``
-- `model_ref`: ``
+- `object_id`: ``
+- `digests`: `typing.Optional[list[str]]`
- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `EvaluateModelRes`
+## class `DatasetDeleteV2Res`
**Pydantic Fields:**
-- `call_id`: ``
+- `num_deleted`: ``
------
---
-
+
-## class `EvaluationStatusComplete`
+## class `DatasetListV2Req`
**Pydantic Fields:**
-- `code`: `typing.Literal['complete']`
-- `output`: `dict[str, typing.Any]`
+- `project_id`: ``
+- `limit`: `typing.Optional[int]`
+- `offset`: `typing.Optional[int]`
+- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `EvaluationStatusFailed`
+## class `DatasetReadV2Req`
**Pydantic Fields:**
-- `code`: `typing.Literal['failed']`
-- `error`: `typing.Optional[str]`
+- `project_id`: ``
+- `object_id`: ``
+- `digest`: ``
+- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `EvaluationStatusNotFound`
+## class `DatasetReadV2Res`
**Pydantic Fields:**
-- `code`: `typing.Literal['not_found']`
+- `object_id`: ``
+- `digest`: ``
+- `version_index`: ``
+- `created_at`: ``
+- `name`: ``
+- `description`: `typing.Optional[str]`
+- `rows`: ``
------
---
-
+
-## class `EvaluationStatusReq`
+## class `EndedCallSchemaForInsert`
**Pydantic Fields:**
- `project_id`: ``
-- `call_id`: ``
+- `id`: ``
+- `ended_at`: ``
+- `exception`: `typing.Optional[str]`
+- `output`: `typing.Optional[typing.Any]`
+- `summary`: ``
+- `wb_run_step_end`: `typing.Optional[int]`
-------
+---------
+
+
+
+### method `serialize_typed_dicts`
+
+```python
+serialize_typed_dicts(v: dict[str, Any]) → dict[str, Any]
+```
---
-
+
-## class `EvaluationStatusRes`
+## class `EnsureProjectExistsRes`
**Pydantic Fields:**
-- `status`: `typing.Union[EvaluationStatusNotFound, EvaluationStatusRunning, EvaluationStatusFailed, EvaluationStatusComplete]`
+- `project_name`: ``
------
---
-
+
-## class `EvaluationStatusRunning`
+## class `EvaluateModelReq`
**Pydantic Fields:**
-- `code`: `typing.Literal['running']`
-- `completed_rows`: ``
-- `total_rows`: ``
+- `project_id`: ``
+- `evaluation_ref`: ``
+- `model_ref`: ``
+- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `ExportTracePartialSuccess`
+## class `EvaluateModelRes`
**Pydantic Fields:**
-- `rejected_spans`: ``
-- `error_message`: ``
+- `call_id`: ``
------
---
-
-
-## class `ExtraKeysTypedDict`
-
----
-
-
+
-## class `Feedback`
+## class `EvaluationCreateV2Body`
**Pydantic Fields:**
-- `id`: ``
-- `project_id`: ``
-- `weave_ref`: ``
-- `creator`: `typing.Optional[str]`
-- `feedback_type`: ``
-- `payload`: `dict[str, typing.Any]`
-- `annotation_ref`: `typing.Optional[str]`
-- `runnable_ref`: `typing.Optional[str]`
-- `call_ref`: `typing.Optional[str]`
-- `trigger_ref`: `typing.Optional[str]`
-- `wb_user_id`: `typing.Optional[str]`
-- `created_at`: ``
+- `name`: ``
+- `description`: `typing.Optional[str]`
+- `dataset`: ``
+- `scorers`: `typing.Optional[list[str]]`
+- `trials`: ``
+- `evaluation_name`: `typing.Optional[str]`
+- `eval_attributes`: `typing.Optional[dict[str, typing.Any]]`
------
---
-
+
-## class `FeedbackCreateBatchReq`
+## class `EvaluationCreateV2Req`
**Pydantic Fields:**
-- `batch`: `list[FeedbackCreateReq]`
+- `name`: ``
+- `description`: `typing.Optional[str]`
+- `dataset`: ``
+- `scorers`: `typing.Optional[list[str]]`
+- `trials`: ``
+- `evaluation_name`: `typing.Optional[str]`
+- `eval_attributes`: `typing.Optional[dict[str, typing.Any]]`
+- `project_id`: ``
+- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `FeedbackCreateBatchRes`
+## class `EvaluationCreateV2Res`
**Pydantic Fields:**
-- `res`: `list[FeedbackCreateRes]`
+- `digest`: ``
+- `object_id`: ``
+- `version_index`: ``
+- `evaluation_ref`: ``
------
---
-
+
-## class `FeedbackCreateReq`
+## class `EvaluationDeleteV2Req`
**Pydantic Fields:**
-- `id`: `typing.Optional[str]`
- `project_id`: ``
-- `weave_ref`: ``
-- `creator`: `typing.Optional[str]`
-- `feedback_type`: ``
-- `payload`: `dict[str, typing.Any]`
-- `annotation_ref`: `typing.Optional[str]`
-- `runnable_ref`: `typing.Optional[str]`
-- `call_ref`: `typing.Optional[str]`
-- `trigger_ref`: `typing.Optional[str]`
+- `object_id`: ``
+- `digests`: `typing.Optional[list[str]]`
- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `FeedbackCreateRes`
+## class `EvaluationDeleteV2Res`
**Pydantic Fields:**
-- `id`: ``
-- `created_at`: ``
-- `wb_user_id`: ``
-- `payload`: `dict[str, typing.Any]`
+- `num_deleted`: ``
------
---
-
-
-## class `FeedbackDict`
-
----
-
-
+
-## class `FeedbackPurgeReq`
+## class `EvaluationListV2Req`
**Pydantic Fields:**
- `project_id`: ``
-- `query`: ``
+- `limit`: `typing.Optional[int]`
+- `offset`: `typing.Optional[int]`
+- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `FeedbackPurgeRes`
+## class `EvaluationReadV2Req`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `object_id`: ``
+- `digest`: ``
+- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `FeedbackQueryReq`
+## class `EvaluationReadV2Res`
**Pydantic Fields:**
-- `project_id`: ``
-- `fields`: `typing.Optional[list[str]]`
-- `query`: `typing.Optional[weave.trace_server.interface.query.Query]`
-- `sort_by`: `typing.Optional[list[SortBy]]`
-- `limit`: `typing.Optional[int]`
-- `offset`: `typing.Optional[int]`
+- `object_id`: ``
+- `digest`: ``
+- `version_index`: ``
+- `created_at`: ``
+- `name`: ``
+- `description`: `typing.Optional[str]`
+- `dataset`: ``
+- `scorers`: `list[str]`
+- `trials`: ``
+- `evaluation_name`: `typing.Optional[str]`
+- `evaluate_op`: `typing.Optional[str]`
+- `predict_and_score_op`: `typing.Optional[str]`
+- `summarize_op`: `typing.Optional[str]`
------
---
-
+
-## class `FeedbackQueryRes`
+## class `EvaluationRunCreateV2Body`
**Pydantic Fields:**
-- `result`: `list[dict[str, typing.Any]]`
+- `evaluation`: ``
+- `model`: ``
------
---
-
+
-## class `FeedbackReplaceReq`
+## class `EvaluationRunCreateV2Req`
**Pydantic Fields:**
-- `id`: `typing.Optional[str]`
+- `evaluation`: ``
+- `model`: ``
- `project_id`: ``
-- `weave_ref`: ``
-- `creator`: `typing.Optional[str]`
-- `feedback_type`: ``
-- `payload`: `dict[str, typing.Any]`
-- `annotation_ref`: `typing.Optional[str]`
-- `runnable_ref`: `typing.Optional[str]`
-- `call_ref`: `typing.Optional[str]`
-- `trigger_ref`: `typing.Optional[str]`
- `wb_user_id`: `typing.Optional[str]`
-- `feedback_id`: ``
------
---
-
+
-## class `FeedbackReplaceRes`
+## class `EvaluationRunCreateV2Res`
**Pydantic Fields:**
-- `id`: ``
-- `created_at`: ``
-- `wb_user_id`: ``
-- `payload`: `dict[str, typing.Any]`
+- `evaluation_run_id`: ``
------
---
-
+
-## class `FileContentReadReq`
+## class `EvaluationRunDeleteV2Req`
**Pydantic Fields:**
- `project_id`: ``
-- `digest`: ``
+- `evaluation_run_ids`: `list[str]`
+- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `FileContentReadRes`
+## class `EvaluationRunDeleteV2Res`
**Pydantic Fields:**
-- `content`: ``
+- `num_deleted`: ``
------
---
-
+
-## class `FileCreateReq`
+## class `EvaluationRunFilterV2`
**Pydantic Fields:**
-- `project_id`: ``
-- `name`: ``
-- `content`: ``
+- `evaluations`: `typing.Optional[list[str]]`
+- `models`: `typing.Optional[list[str]]`
+- `evaluation_run_ids`: `typing.Optional[list[str]]`
------
---
-
+
-## class `FileCreateRes`
+## class `EvaluationRunFinishV2Body`
+Request body for finishing an evaluation run via REST API.
+
+This model excludes project_id and evaluation_run_id since they come from the URL path in RESTful endpoints.
**Pydantic Fields:**
-- `digest`: ``
+- `summary`: `typing.Optional[dict[str, typing.Any]]`
------
---
-
+
-## class `FilesStatsReq`
+## class `EvaluationRunFinishV2Req`
**Pydantic Fields:**
+- `summary`: `typing.Optional[dict[str, typing.Any]]`
- `project_id`: ``
+- `evaluation_run_id`: ``
+- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `FilesStatsRes`
+## class `EvaluationRunFinishV2Res`
**Pydantic Fields:**
-- `total_size_bytes`: ``
+- `success`: ``
------
---
-
+
-## class `ImageGenerationCreateReq`
+## class `EvaluationRunListV2Req`
**Pydantic Fields:**
- `project_id`: ``
-- `inputs`: ``
-- `wb_user_id`: `typing.Optional[str]`
-- `track_llm_call`: `typing.Optional[bool]`
+- `filter`: `typing.Optional[EvaluationRunFilterV2]`
+- `limit`: `typing.Optional[int]`
+- `offset`: `typing.Optional[int]`
------
---
-
+
-## class `ImageGenerationCreateRes`
+## class `EvaluationRunReadV2Req`
**Pydantic Fields:**
-- `response`: `dict[str, typing.Any]`
-- `weave_call_id`: `typing.Optional[str]`
+- `project_id`: ``
+- `evaluation_run_id`: ``
------
---
-
+
-## class `ImageGenerationRequestInputs`
+## class `EvaluationRunReadV2Res`
**Pydantic Fields:**
+- `evaluation_run_id`: ``
+- `evaluation`: ``
- `model`: ``
-- `prompt`: ``
-- `n`: `typing.Optional[int]`
+- `status`: `typing.Optional[str]`
+- `started_at`: `typing.Optional[datetime.datetime]`
+- `finished_at`: `typing.Optional[datetime.datetime]`
+- `summary`: `typing.Optional[dict[str, typing.Any]]`
------
---
-
+
-## class `LLMCostSchema`
+## class `EvaluationStatusComplete`
----
+**Pydantic Fields:**
-
+- `code`: `typing.Literal['complete']`
+- `output`: `dict[str, typing.Any]`
-## class `LLMUsageSchema`
+------
---
-
+
-## class `ObjCreateReq`
+## class `EvaluationStatusFailed`
**Pydantic Fields:**
-- `obj`: ``
+- `code`: `typing.Literal['failed']`
+- `error`: `typing.Optional[str]`
------
---
-
+
-## class `ObjCreateRes`
+## class `EvaluationStatusNotFound`
**Pydantic Fields:**
-- `digest`: ``
+- `code`: `typing.Literal['not_found']`
------
---
-
+
-## class `ObjDeleteReq`
+## class `EvaluationStatusReq`
**Pydantic Fields:**
- `project_id`: ``
-- `object_id`: ``
-- `digests`: `typing.Optional[list[str]]`
+- `call_id`: ``
------
---
-
+
-## class `ObjDeleteRes`
+## class `EvaluationStatusRes`
**Pydantic Fields:**
-- `num_deleted`: ``
+- `status`: `typing.Union[EvaluationStatusNotFound, EvaluationStatusRunning, EvaluationStatusFailed, EvaluationStatusComplete]`
------
---
-
+
-## class `ObjQueryReq`
+## class `EvaluationStatusRunning`
**Pydantic Fields:**
-- `project_id`: ``
-- `filter`: `typing.Optional[ObjectVersionFilter]`
+- `code`: `typing.Literal['running']`
+- `completed_rows`: ``
+- `total_rows`: ``
+
+------
+
+---
+
+
+
+## class `ExportTracePartialSuccess`
+
+**Pydantic Fields:**
+
+- `rejected_spans`: ``
+- `error_message`: ``
+
+------
+
+---
+
+
+
+## class `ExtraKeysTypedDict`
+
+---
+
+
+
+## class `Feedback`
+
+**Pydantic Fields:**
+
+- `id`: ``
+- `project_id`: ``
+- `weave_ref`: ``
+- `creator`: `typing.Optional[str]`
+- `feedback_type`: ``
+- `payload`: `dict[str, typing.Any]`
+- `annotation_ref`: `typing.Optional[str]`
+- `runnable_ref`: `typing.Optional[str]`
+- `call_ref`: `typing.Optional[str]`
+- `trigger_ref`: `typing.Optional[str]`
+- `wb_user_id`: `typing.Optional[str]`
+- `created_at`: ``
+
+------
+
+---
+
+
+
+## class `FeedbackCreateBatchReq`
+
+**Pydantic Fields:**
+
+- `batch`: `list[FeedbackCreateReq]`
+
+------
+
+---
+
+
+
+## class `FeedbackCreateBatchRes`
+
+**Pydantic Fields:**
+
+- `res`: `list[FeedbackCreateRes]`
+
+------
+
+---
+
+
+
+## class `FeedbackCreateReq`
+
+**Pydantic Fields:**
+
+- `id`: `typing.Optional[str]`
+- `project_id`: ``
+- `weave_ref`: ``
+- `creator`: `typing.Optional[str]`
+- `feedback_type`: ``
+- `payload`: `dict[str, typing.Any]`
+- `annotation_ref`: `typing.Optional[str]`
+- `runnable_ref`: `typing.Optional[str]`
+- `call_ref`: `typing.Optional[str]`
+- `trigger_ref`: `typing.Optional[str]`
+- `wb_user_id`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `FeedbackCreateRes`
+
+**Pydantic Fields:**
+
+- `id`: ``
+- `created_at`: ``
+- `wb_user_id`: ``
+- `payload`: `dict[str, typing.Any]`
+
+------
+
+---
+
+
+
+## class `FeedbackDict`
+
+---
+
+
+
+## class `FeedbackPurgeReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `query`: ``
+
+------
+
+---
+
+
+
+## class `FeedbackPurgeRes`
+
+------
+
+---
+
+
+
+## class `FeedbackQueryReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `fields`: `typing.Optional[list[str]]`
+- `query`: `typing.Optional[weave.trace_server.interface.query.Query]`
+- `sort_by`: `typing.Optional[list[SortBy]]`
+- `limit`: `typing.Optional[int]`
+- `offset`: `typing.Optional[int]`
+
+------
+
+---
+
+
+
+## class `FeedbackQueryRes`
+
+**Pydantic Fields:**
+
+- `result`: `list[dict[str, typing.Any]]`
+
+------
+
+---
+
+
+
+## class `FeedbackReplaceReq`
+
+**Pydantic Fields:**
+
+- `id`: `typing.Optional[str]`
+- `project_id`: ``
+- `weave_ref`: ``
+- `creator`: `typing.Optional[str]`
+- `feedback_type`: ``
+- `payload`: `dict[str, typing.Any]`
+- `annotation_ref`: `typing.Optional[str]`
+- `runnable_ref`: `typing.Optional[str]`
+- `call_ref`: `typing.Optional[str]`
+- `trigger_ref`: `typing.Optional[str]`
+- `wb_user_id`: `typing.Optional[str]`
+- `feedback_id`: ``
+
+------
+
+---
+
+
+
+## class `FeedbackReplaceRes`
+
+**Pydantic Fields:**
+
+- `id`: ``
+- `created_at`: ``
+- `wb_user_id`: ``
+- `payload`: `dict[str, typing.Any]`
+
+------
+
+---
+
+
+
+## class `FileContentReadReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `digest`: ``
+
+------
+
+---
+
+
+
+## class `FileContentReadRes`
+
+**Pydantic Fields:**
+
+- `content`: ``
+
+------
+
+---
+
+
+
+## class `FileCreateReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `name`: ``
+- `content`: ``
+
+------
+
+---
+
+
+
+## class `FileCreateRes`
+
+**Pydantic Fields:**
+
+- `digest`: ``
+
+------
+
+---
+
+
+
+## class `FilesStatsReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+
+------
+
+---
+
+
+
+## class `FilesStatsRes`
+
+**Pydantic Fields:**
+
+- `total_size_bytes`: ``
+
+------
+
+---
+
+
+
+## class `FullTraceServerInterface`
+Complete trace server interface supporting both V1 and V2 APIs.
+
+This protocol represents a trace server implementation that supports the full set of APIs - both legacy V1 endpoints and modern V2 endpoints. Use this type for implementations that need to support both API versions.
+
+---
+
+
+
+### method `actions_execute_batch`
+
+```python
+actions_execute_batch(req: ActionsExecuteBatchReq) → ActionsExecuteBatchRes
+```
+
+---
+
+
+
+### method `call_end`
+
+```python
+call_end(req: CallEndReq) → CallEndRes
+```
+
+---
+
+
+
+### method `call_read`
+
+```python
+call_read(req: CallReadReq) → CallReadRes
+```
+
+---
+
+
+
+### method `call_start`
+
+```python
+call_start(req: CallStartReq) → CallStartRes
+```
+
+---
+
+
+
+### method `call_start_batch`
+
+```python
+call_start_batch(req: CallCreateBatchReq) → CallCreateBatchRes
+```
+
+---
+
+
+
+### method `call_update`
+
+```python
+call_update(req: CallUpdateReq) → CallUpdateRes
+```
+
+---
+
+
+
+### method `calls_delete`
+
+```python
+calls_delete(req: CallsDeleteReq) → CallsDeleteRes
+```
+
+---
+
+
+
+### method `calls_query`
+
+```python
+calls_query(req: CallsQueryReq) → CallsQueryRes
+```
+
+---
+
+
+
+### method `calls_query_stats`
+
+```python
+calls_query_stats(req: CallsQueryStatsReq) → CallsQueryStatsRes
+```
+
+---
+
+
+
+### method `calls_query_stream`
+
+```python
+calls_query_stream(req: CallsQueryReq) → Iterator[CallSchema]
+```
+
+---
+
+
+
+### method `completions_create`
+
+```python
+completions_create(req: CompletionsCreateReq) → CompletionsCreateRes
+```
+
+---
+
+
+
+### method `completions_create_stream`
+
+```python
+completions_create_stream(req: CompletionsCreateReq) → Iterator[dict[str, Any]]
+```
+
+---
+
+
+
+### method `cost_create`
+
+```python
+cost_create(req: CostCreateReq) → CostCreateRes
+```
+
+---
+
+
+
+### method `cost_purge`
+
+```python
+cost_purge(req: CostPurgeReq) → CostPurgeRes
+```
+
+---
+
+
+
+### method `cost_query`
+
+```python
+cost_query(req: CostQueryReq) → CostQueryRes
+```
+
+---
+
+
+
+### method `dataset_create_v2`
+
+```python
+dataset_create_v2(req: DatasetCreateV2Req) → DatasetCreateV2Res
+```
+
+---
+
+
+
+### method `dataset_delete_v2`
+
+```python
+dataset_delete_v2(req: DatasetDeleteV2Req) → DatasetDeleteV2Res
+```
+
+---
+
+
+
+### method `dataset_list_v2`
+
+```python
+dataset_list_v2(req: DatasetListV2Req) → Iterator[DatasetReadV2Res]
+```
+
+---
+
+
+
+### method `dataset_read_v2`
+
+```python
+dataset_read_v2(req: DatasetReadV2Req) → DatasetReadV2Res
+```
+
+---
+
+
+
+### method `ensure_project_exists`
+
+```python
+ensure_project_exists(entity: str, project: str) → EnsureProjectExistsRes
+```
+
+---
+
+
+
+### method `evaluate_model`
+
+```python
+evaluate_model(req: EvaluateModelReq) → EvaluateModelRes
+```
+
+---
+
+
+
+### method `evaluation_create_v2`
+
+```python
+evaluation_create_v2(req: EvaluationCreateV2Req) → EvaluationCreateV2Res
+```
+
+---
+
+
+
+### method `evaluation_delete_v2`
+
+```python
+evaluation_delete_v2(req: EvaluationDeleteV2Req) → EvaluationDeleteV2Res
+```
+
+---
+
+
+
+### method `evaluation_list_v2`
+
+```python
+evaluation_list_v2(req: EvaluationListV2Req) → Iterator[EvaluationReadV2Res]
+```
+
+---
+
+
+
+### method `evaluation_read_v2`
+
+```python
+evaluation_read_v2(req: EvaluationReadV2Req) → EvaluationReadV2Res
+```
+
+---
+
+
+
+### method `evaluation_run_create_v2`
+
+```python
+evaluation_run_create_v2(
+ req: EvaluationRunCreateV2Req
+) → EvaluationRunCreateV2Res
+```
+
+---
+
+
+
+### method `evaluation_run_delete_v2`
+
+```python
+evaluation_run_delete_v2(
+ req: EvaluationRunDeleteV2Req
+) → EvaluationRunDeleteV2Res
+```
+
+---
+
+
+
+### method `evaluation_run_finish_v2`
+
+```python
+evaluation_run_finish_v2(
+ req: EvaluationRunFinishV2Req
+) → EvaluationRunFinishV2Res
+```
+
+---
+
+
+
+### method `evaluation_run_list_v2`
+
+```python
+evaluation_run_list_v2(
+ req: EvaluationRunListV2Req
+) → Iterator[EvaluationRunReadV2Res]
+```
+
+---
+
+
+
+### method `evaluation_run_read_v2`
+
+```python
+evaluation_run_read_v2(req: EvaluationRunReadV2Req) → EvaluationRunReadV2Res
+```
+
+---
+
+
+
+### method `evaluation_status`
+
+```python
+evaluation_status(req: EvaluationStatusReq) → EvaluationStatusRes
+```
+
+---
+
+
+
+### method `feedback_create`
+
+```python
+feedback_create(req: FeedbackCreateReq) → FeedbackCreateRes
+```
+
+---
+
+
+
+### method `feedback_create_batch`
+
+```python
+feedback_create_batch(req: FeedbackCreateBatchReq) → FeedbackCreateBatchRes
+```
+
+---
+
+
+
+### method `feedback_purge`
+
+```python
+feedback_purge(req: FeedbackPurgeReq) → FeedbackPurgeRes
+```
+
+---
+
+
+
+### method `feedback_query`
+
+```python
+feedback_query(req: FeedbackQueryReq) → FeedbackQueryRes
+```
+
+---
+
+
+
+### method `feedback_replace`
+
+```python
+feedback_replace(req: FeedbackReplaceReq) → FeedbackReplaceRes
+```
+
+---
+
+
+
+### method `file_content_read`
+
+```python
+file_content_read(req: FileContentReadReq) → FileContentReadRes
+```
+
+---
+
+
+
+### method `file_create`
+
+```python
+file_create(req: FileCreateReq) → FileCreateRes
+```
+
+---
+
+
+
+### method `files_stats`
+
+```python
+files_stats(req: FilesStatsReq) → FilesStatsRes
+```
+
+---
+
+
+
+### method `image_create`
+
+```python
+image_create(req: ImageGenerationCreateReq) → ImageGenerationCreateRes
+```
+
+---
+
+
+
+### method `model_create_v2`
+
+```python
+model_create_v2(req: ModelCreateV2Req) → ModelCreateV2Res
+```
+
+---
+
+
+
+### method `model_delete_v2`
+
+```python
+model_delete_v2(req: ModelDeleteV2Req) → ModelDeleteV2Res
+```
+
+---
+
+
+
+### method `model_list_v2`
+
+```python
+model_list_v2(req: ModelListV2Req) → Iterator[ModelReadV2Res]
+```
+
+---
+
+
+
+### method `model_read_v2`
+
+```python
+model_read_v2(req: ModelReadV2Req) → ModelReadV2Res
+```
+
+---
+
+
+
+### method `obj_create`
+
+```python
+obj_create(req: ObjCreateReq) → ObjCreateRes
+```
+
+---
+
+
+
+### method `obj_delete`
+
+```python
+obj_delete(req: ObjDeleteReq) → ObjDeleteRes
+```
+
+---
+
+
+
+### method `obj_read`
+
+```python
+obj_read(req: ObjReadReq) → ObjReadRes
+```
+
+---
+
+
+
+### method `objs_query`
+
+```python
+objs_query(req: ObjQueryReq) → ObjQueryRes
+```
+
+---
+
+
+
+### method `op_create`
+
+```python
+op_create(req: OpCreateReq) → OpCreateRes
+```
+
+---
+
+
+
+### method `op_create_v2`
+
+```python
+op_create_v2(req: OpCreateV2Req) → OpCreateV2Res
+```
+
+---
+
+
+
+### method `op_delete_v2`
+
+```python
+op_delete_v2(req: OpDeleteV2Req) → OpDeleteV2Res
+```
+
+---
+
+
+
+### method `op_list_v2`
+
+```python
+op_list_v2(req: OpListV2Req) → Iterator[OpReadV2Res]
+```
+
+---
+
+
+
+### method `op_read`
+
+```python
+op_read(req: OpReadReq) → OpReadRes
+```
+
+---
+
+
+
+### method `op_read_v2`
+
+```python
+op_read_v2(req: OpReadV2Req) → OpReadV2Res
+```
+
+---
+
+
+
+### method `ops_query`
+
+```python
+ops_query(req: OpQueryReq) → OpQueryRes
+```
+
+---
+
+
+
+### method `otel_export`
+
+```python
+otel_export(req: OtelExportReq) → OtelExportRes
+```
+
+---
+
+
+
+### method `prediction_create_v2`
+
+```python
+prediction_create_v2(req: PredictionCreateV2Req) → PredictionCreateV2Res
+```
+
+---
+
+
+
+### method `prediction_delete_v2`
+
+```python
+prediction_delete_v2(req: PredictionDeleteV2Req) → PredictionDeleteV2Res
+```
+
+---
+
+
+
+### method `prediction_finish_v2`
+
+```python
+prediction_finish_v2(req: PredictionFinishV2Req) → PredictionFinishV2Res
+```
+
+---
+
+
+
+### method `prediction_list_v2`
+
+```python
+prediction_list_v2(req: PredictionListV2Req) → Iterator[PredictionReadV2Res]
+```
+
+---
+
+
+
+### method `prediction_read_v2`
+
+```python
+prediction_read_v2(req: PredictionReadV2Req) → PredictionReadV2Res
+```
+
+---
+
+
+
+### method `project_stats`
+
+```python
+project_stats(req: ProjectStatsReq) → ProjectStatsRes
+```
+
+---
+
+
+
+### method `refs_read_batch`
+
+```python
+refs_read_batch(req: RefsReadBatchReq) → RefsReadBatchRes
+```
+
+---
+
+
+
+### method `score_create_v2`
+
+```python
+score_create_v2(req: ScoreCreateV2Req) → ScoreCreateV2Res
+```
+
+---
+
+
+
+### method `score_delete_v2`
+
+```python
+score_delete_v2(req: ScoreDeleteV2Req) → ScoreDeleteV2Res
+```
+
+---
+
+
+
+### method `score_list_v2`
+
+```python
+score_list_v2(req: ScoreListV2Req) → Iterator[ScoreReadV2Res]
+```
+
+---
+
+
+
+### method `score_read_v2`
+
+```python
+score_read_v2(req: ScoreReadV2Req) → ScoreReadV2Res
+```
+
+---
+
+
+
+### method `scorer_create_v2`
+
+```python
+scorer_create_v2(req: ScorerCreateV2Req) → ScorerCreateV2Res
+```
+
+---
+
+
+
+### method `scorer_delete_v2`
+
+```python
+scorer_delete_v2(req: ScorerDeleteV2Req) → ScorerDeleteV2Res
+```
+
+---
+
+
+
+### method `scorer_list_v2`
+
+```python
+scorer_list_v2(req: ScorerListV2Req) → Iterator[ScorerReadV2Res]
+```
+
+---
+
+
+
+### method `scorer_read_v2`
+
+```python
+scorer_read_v2(req: ScorerReadV2Req) → ScorerReadV2Res
+```
+
+---
+
+
+
+### method `table_create`
+
+```python
+table_create(req: TableCreateReq) → TableCreateRes
+```
+
+---
+
+
+
+### method `table_create_from_digests`
+
+```python
+table_create_from_digests(
+ req: TableCreateFromDigestsReq
+) → TableCreateFromDigestsRes
+```
+
+---
+
+
+
+### method `table_query`
+
+```python
+table_query(req: TableQueryReq) → TableQueryRes
+```
+
+---
+
+
+
+### method `table_query_stats`
+
+```python
+table_query_stats(req: TableQueryStatsReq) → TableQueryStatsRes
+```
+
+---
+
+
+
+### method `table_query_stats_batch`
+
+```python
+table_query_stats_batch(req: TableQueryStatsBatchReq) → TableQueryStatsBatchRes
+```
+
+---
+
+
+
+### method `table_query_stream`
+
+```python
+table_query_stream(req: TableQueryReq) → Iterator[TableRowSchema]
+```
+
+---
+
+
+
+### method `table_update`
+
+```python
+table_update(req: TableUpdateReq) → TableUpdateRes
+```
+
+---
+
+
+
+### method `threads_query_stream`
+
+```python
+threads_query_stream(req: ThreadsQueryReq) → Iterator[ThreadSchema]
+```
+
+---
+
+
+
+## class `ImageGenerationCreateReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `inputs`: ``
+- `wb_user_id`: `typing.Optional[str]`
+- `track_llm_call`: `typing.Optional[bool]`
+
+------
+
+---
+
+
+
+## class `ImageGenerationCreateRes`
+
+**Pydantic Fields:**
+
+- `response`: `dict[str, typing.Any]`
+- `weave_call_id`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `ImageGenerationRequestInputs`
+
+**Pydantic Fields:**
+
+- `model`: ``
+- `prompt`: ``
+- `n`: `typing.Optional[int]`
+
+------
+
+---
+
+
+
+## class `LLMCostSchema`
+
+---
+
+
+
+## class `LLMUsageSchema`
+
+---
+
+
+
+## class `ModelCreateV2Body`
+
+**Pydantic Fields:**
+
+- `name`: ``
+- `description`: `typing.Optional[str]`
+- `source_code`: ``
+- `attributes`: `typing.Optional[dict[str, typing.Any]]`
+
+------
+
+---
+
+
+
+## class `ModelCreateV2Req`
+
+**Pydantic Fields:**
+
+- `name`: ``
+- `description`: `typing.Optional[str]`
+- `source_code`: ``
+- `attributes`: `typing.Optional[dict[str, typing.Any]]`
+- `project_id`: ``
+- `wb_user_id`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `ModelCreateV2Res`
+
+**Pydantic Fields:**
+
+- `digest`: ``
+- `object_id`: ``
+- `version_index`: ``
+- `model_ref`: ``
+
+------
+
+---
+
+
+
+## class `ModelDeleteV2Req`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `object_id`: ``
+- `digests`: `typing.Optional[list[str]]`
+- `wb_user_id`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `ModelDeleteV2Res`
+
+**Pydantic Fields:**
+
+- `num_deleted`: ``
+
+------
+
+---
+
+
+
+## class `ModelListV2Req`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `limit`: `typing.Optional[int]`
+- `offset`: `typing.Optional[int]`
+
+------
+
+---
+
+
+
+## class `ModelReadV2Req`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `object_id`: ``
+- `digest`: ``
+
+------
+
+---
+
+
+
+## class `ModelReadV2Res`
+
+**Pydantic Fields:**
+
+- `object_id`: ``
+- `digest`: ``
+- `version_index`: ``
+- `created_at`: ``
+- `name`: ``
+- `description`: `typing.Optional[str]`
+- `source_code`: ``
+- `attributes`: `typing.Optional[dict[str, typing.Any]]`
+
+------
+
+---
+
+
+
+## class `ObjCreateReq`
+
+**Pydantic Fields:**
+
+- `obj`: ``
+
+------
+
+---
+
+
+
+## class `ObjCreateRes`
+
+**Pydantic Fields:**
+
+- `digest`: ``
+- `object_id`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `ObjDeleteReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `object_id`: ``
+- `digests`: `typing.Optional[list[str]]`
+
+------
+
+---
+
+
+
+## class `ObjDeleteRes`
+
+**Pydantic Fields:**
+
+- `num_deleted`: ``
+
+------
+
+---
+
+
+
+## class `ObjQueryReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `filter`: `typing.Optional[ObjectVersionFilter]`
+- `limit`: `typing.Optional[int]`
+- `offset`: `typing.Optional[int]`
+- `sort_by`: `typing.Optional[list[SortBy]]`
+- `metadata_only`: `typing.Optional[bool]`
+- `include_storage_size`: `typing.Optional[bool]`
+
+------
+
+---
+
+
+
+## class `ObjQueryRes`
+
+**Pydantic Fields:**
+
+- `objs`: `list[ObjSchema]`
+
+------
+
+---
+
+
+
+## class `ObjReadReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `object_id`: ``
+- `digest`: ``
+- `metadata_only`: `typing.Optional[bool]`
+
+------
+
+---
+
+
+
+## class `ObjReadRes`
+
+**Pydantic Fields:**
+
+- `obj`: ``
+
+------
+
+---
+
+
+
+## class `ObjSchema`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `object_id`: ``
+- `created_at`: ``
+- `deleted_at`: `typing.Optional[datetime.datetime]`
+- `digest`: ``
+- `version_index`: ``
+- `is_latest`: ``
+- `kind`: ``
+- `base_object_class`: `typing.Optional[str]`
+- `leaf_object_class`: `typing.Optional[str]`
+- `val`: `typing.Any`
+- `wb_user_id`: `typing.Optional[str]`
+- `size_bytes`: `typing.Optional[int]`
+
+------
+
+---
+
+
+
+## class `ObjSchemaForInsert`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `object_id`: ``
+- `val`: `typing.Any`
+- `builtin_object_class`: `typing.Optional[str]`
+- `set_base_object_class`: `typing.Optional[str]`
+- `wb_user_id`: `typing.Optional[str]`
+
+---------
+
+
+
+### method `model_post_init`
+
+```python
+model_post_init(_ObjSchemaForInsert__context: Any) → None
+```
+
+---
+
+
+
+## class `ObjectVersionFilter`
+
+**Pydantic Fields:**
+
+- `base_object_classes`: `typing.Optional[list[str]]`
+- `exclude_base_object_classes`: `typing.Optional[list[str]]`
+- `leaf_object_classes`: `typing.Optional[list[str]]`
+- `object_ids`: `typing.Optional[list[str]]`
+- `is_op`: `typing.Optional[bool]`
+- `latest_only`: `typing.Optional[bool]`
+
+------
+
+---
+
+
+
+## class `OpCreateReq`
+
+**Pydantic Fields:**
+
+- `op_obj`: ``
+
+------
+
+---
+
+
+
+## class `OpCreateRes`
+
+**Pydantic Fields:**
+
+- `digest`: ``
+
+------
+
+---
+
+
+
+## class `OpCreateV2Body`
+Request body for creating an Op object via REST API.
+
+This model excludes project_id since it comes from the URL path in RESTful endpoints.
+
+**Pydantic Fields:**
+
+- `name`: `typing.Optional[str]`
+- `source_code`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `OpCreateV2Req`
+Request model for creating an Op object.
+
+Extends OpCreateV2Body by adding project_id for internal API usage.
+
+**Pydantic Fields:**
+
+- `name`: `typing.Optional[str]`
+- `source_code`: `typing.Optional[str]`
+- `project_id`: ``
+- `wb_user_id`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `OpCreateV2Res`
+Response model for creating an Op object.
+
+**Pydantic Fields:**
+
+- `digest`: ``
+- `object_id`: ``
+- `version_index`: ``
+
+------
+
+---
+
+
+
+## class `OpDeleteV2Req`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `object_id`: ``
+- `digests`: `typing.Optional[list[str]]`
+- `wb_user_id`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `OpDeleteV2Res`
+
+**Pydantic Fields:**
+
+- `num_deleted`: ``
+
+------
+
+---
+
+
+
+## class `OpListV2Req`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
- `limit`: `typing.Optional[int]`
- `offset`: `typing.Optional[int]`
-- `sort_by`: `typing.Optional[list[SortBy]]`
-- `metadata_only`: `typing.Optional[bool]`
-- `include_storage_size`: `typing.Optional[bool]`
+- `wb_user_id`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `OpQueryReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `filter`: `typing.Optional[OpVersionFilter]`
+
+------
+
+---
+
+
+
+## class `OpQueryRes`
+
+**Pydantic Fields:**
+
+- `op_objs`: `list[ObjSchema]`
+
+------
+
+---
+
+
+
+## class `OpReadReq`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `name`: ``
+- `digest`: ``
+
+------
+
+---
+
+
+
+## class `OpReadRes`
+
+**Pydantic Fields:**
+
+- `op_obj`: ``
+
+------
+
+---
+
+
+
+## class `OpReadV2Req`
+
+**Pydantic Fields:**
+
+- `project_id`: ``
+- `object_id`: ``
+- `digest`: ``
+- `wb_user_id`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `OpReadV2Res`
+Response model for reading an Op object.
+
+The code field contains the actual source code of the op.
+
+**Pydantic Fields:**
+
+- `object_id`: ``
+- `digest`: ``
+- `version_index`: ``
+- `created_at`: ``
+- `code`: ``
+
+------
+
+---
+
+
+
+## class `OpVersionFilter`
+
+**Pydantic Fields:**
+
+- `op_names`: `typing.Optional[list[str]]`
+- `latest_only`: `typing.Optional[bool]`
------
---
-
+
-## class `ObjQueryRes`
+## class `OtelExportReq`
**Pydantic Fields:**
-- `objs`: `list[ObjSchema]`
+- `project_id`: ``
+- `traces`: `typing.Any`
+- `wb_run_id`: `typing.Optional[str]`
+- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `ObjReadReq`
+## class `OtelExportRes`
+
+**Pydantic Fields:**
+
+- `partial_success`: `typing.Optional[ExportTracePartialSuccess]`
+
+------
+
+---
+
+
+
+## class `PredictionCreateV2Body`
+Request body for creating a Prediction via REST API.
+
+This model excludes project_id since it comes from the URL path in RESTful endpoints.
+
+**Pydantic Fields:**
+
+- `model`: ``
+- `inputs`: `dict[str, typing.Any]`
+- `output`: `typing.Any`
+- `evaluation_run_id`: `typing.Optional[str]`
+
+------
+
+---
+
+
+
+## class `PredictionCreateV2Req`
+Request model for creating a Prediction.
+
+Extends PredictionCreateV2Body by adding project_id for internal API usage.
**Pydantic Fields:**
+- `model`: ``
+- `inputs`: `dict[str, typing.Any]`
+- `output`: `typing.Any`
+- `evaluation_run_id`: `typing.Optional[str]`
- `project_id`: ``
-- `object_id`: ``
-- `digest`: ``
-- `metadata_only`: `typing.Optional[bool]`
+- `wb_user_id`: `typing.Optional[str]`
------
---
-
+
-## class `ObjReadRes`
+## class `PredictionCreateV2Res`
**Pydantic Fields:**
-- `obj`: ``
+- `prediction_id`: ``
------
---
-
+
-## class `ObjSchema`
+## class `PredictionDeleteV2Req`
**Pydantic Fields:**
- `project_id`: ``
-- `object_id`: ``
-- `created_at`: ``
-- `deleted_at`: `typing.Optional[datetime.datetime]`
-- `digest`: ``
-- `version_index`: ``
-- `is_latest`: ``
-- `kind`: ``
-- `base_object_class`: `typing.Optional[str]`
-- `leaf_object_class`: `typing.Optional[str]`
-- `val`: `typing.Any`
+- `prediction_ids`: `list[str]`
- `wb_user_id`: `typing.Optional[str]`
-- `size_bytes`: `typing.Optional[int]`
------
---
-
+
-## class `ObjSchemaForInsert`
+## class `PredictionDeleteV2Res`
+
+**Pydantic Fields:**
+
+- `num_deleted`: ``
+
+------
+
+---
+
+