Get aggregate statistics over queried runs.
Takes in similar query parameters to list_runs and returns statistics
based on the runs that match the query.
get_run_stats(
self,
*,
id: Optional[list[ID_TYPE]] = None,
trace: Optional[ID_TYPE] = None,
parent_run: Optional[ID_TYPE] = None,
run_type: Optional[str] = None,
project_names: Optional[list[str]] = None,
project_ids: Optional[list[ID_TYPE]] = None,
reference_example_ids: Optional[list[ID_TYPE]] = None,
start_time: Optional[str] = None,
end_time: Optional[str] = None,
error: Optional[bool] = None,
query: Optional[str] = None,
filter: Optional[str] = None,
trace_filter: Optional[str] = None,
tree_filter: Optional[str] = None,
is_root: Optional[bool] = None,
data_source_type: Optional[str] = None
) -> dict[str, Any]| Name | Type | Description |
|---|---|---|
id | Optional[List[Union[UUID, str]]] | Default: NoneList of run IDs to filter by. |
trace | Optional[Union[UUID, str]] | Default: NoneTrace ID to filter by. |
parent_run | Optional[Union[UUID, str]] | Default: NoneParent run ID to filter by. |
run_type | Optional[str] | Default: NoneRun type to filter by. |
project_names | Optional[List[str]] | Default: NoneList of project names to filter by. |
project_ids | Optional[List[Union[UUID, str]]] | Default: NoneList of project IDs to filter by. |
reference_example_ids | Optional[List[Union[UUID, str]]] | Default: NoneList of reference example IDs to filter by. |
start_time | Optional[str] | Default: NoneStart time to filter by. |
end_time | Optional[str] | Default: NoneEnd time to filter by. |
error | Optional[bool] | Default: NoneFilter by error status. |
query | Optional[str] | Default: NoneQuery string to filter by. |
filter | Optional[str] | Default: NoneFilter string to apply. |
trace_filter | Optional[str] | Default: NoneTrace filter string to apply. |
tree_filter | Optional[str] | Default: NoneTree filter string to apply. |
is_root | Optional[bool] | Default: NoneFilter by root run status. |
data_source_type | Optional[str] | Default: NoneData source type to filter by. |