orcalib.curate.runs_handle#
RunsHandle
#
A handle to query runs of a model.
Parameters:
-
database_name
(str
) –The name of the database the runs are stored in.
-
model_id
(str | None
, default:None
) –The model id to filter the model runs by.
-
model_version
(str | None
, default:None
) –The model version to filter the model runs by.
select
#
A thin peewee wrapper method for selecting columns in the query.
Parameters:
-
args
(str | Column | Alias
, default:()
) –The columns to select
Returns:
-
ModelRunsSelectQuery
–The query object for chaining
Examples:
ModelRunsSelectQuery
#
Bases: BaseSelectQuery
having
#
Thin peewee wrapper method for having filters on aggregate function results.
Parameters:
-
args
(Any
, default:()
) –The conditions to filter by
Returns:
-
BaseSelectQuery
–The query object for chaining
Examples:
limit
#
Thin peewee wrapper method to limit the number of rows returned.
Parameters:
-
limit
(int
) –The maximum number of rows to return
Returns:
-
BaseSelectQuery
–The query object for chaining
Examples:
offset
#
Thin peewee wrapper method for applying an offset to the query.
Parameters:
-
offset
(int
) –The number of rows to skip
Returns:
-
BaseSelectQuery
–The query object for chaining
Examples:
order_by
#
Thin peewee wrapper method for ordering the results.
Parameters:
-
args
(Any
, default:()
) –The columns to order by
Returns:
-
BaseSelectQuery
–The query object for chaining
Examples:
where
#
Thin peewee wrapper method for filtering the results.
Parameters:
-
args
(Any
, default:()
) –The conditions to filter by
Returns:
-
BaseSelectQuery
–The query object for chaining
Examples:
df
#
Fetch rows from the table and return as a DataFrame
Parameters:
-
limit
(int | None
, default:None
) –The maximum number of rows to return, if
None
returns all rows -
offset
(int | None
, default:None
) –The number of rows to skip, if
None
starts from the beginning
Returns:
-
DataFrame
–A pandas data frame containing the rows
sql
#
aggregate_memory_lookups
#
Thin peewee wrapper method for aggregating the memory lookups.
Parameters:
-
args
(str | Column | Alias
, default:()
) –The columns to aggregate by
Returns:
-
ModelRunsSelectQuery
–The query object for chaining
Examples:
select_all_feedback
#
Method for returning all feedback with the run. This sets a flag to fetch all feedback.
Returns:
-
ModelRunsSelectQuery
–The query object for chaining
join_memory_lookups
#
Thin peewee wrapper method for joining the memory lookups.
Returns:
-
ModelRunsSelectQuery
–The query object for chaining