orcalib.curate.memories_handle#
MemoriesHandle
#
A handle to query memories associated with an index used in a model.
Parameters:
-
index_name
(str | None
, default:None
) –The index that the memories are associated with.
-
table_name
(str | None
, default:None
) –The table that the memories are stored in.
-
database_name
(str
) –The name of the database the index is defined on.
-
model_id
(str | None
, default:None
) –The model id to filter the model run memory lookups by.
-
model_version
(str | None
, default:None
) –The model version to filter the model run memory lookups by.
select
#
Thin peewee wrapper method for selecting the columns to return.
Parameters:
-
args
(str | Column | Alias
, default:()
) –The columns to select
Returns:
-
MemoriesSelectQuery
–The query object for chaining
Examples:
MemoriesSelectQuery
#
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_runs
#
Thin peewee wrapper method for aggregating the results by runs.
Parameters:
-
args
(str | Column | Alias
, default:()
) –The columns to aggregate by
Returns:
-
MemoriesSelectQuery
–The query object for chaining
Examples:
aggregate_feedback
#
Method for aggregating the feedback table values onto a memory.
Returns:
-
MemoriesSelectQuery
–The query object for chaining
Examples:
select_all_feedback
#
Method for returning all feedback with the memories. This sets a flag to fetch all feedback.
Returns:
-
MemoriesSelectQuery
–The query object for chaining
fetch
#
Extract the SQL query from peewee and run it through Orca Client to get results.
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:
Examples: