citrine.resources.predictor_evaluation_execution module

Resources that represent both individual and collections of predictor evaluation executions.

class citrine.resources.predictor_evaluation_execution.PredictorEvaluationExecutionCollection(project_id: UUID, session: Session, workflow_id: UUID | None = None)

Bases: Collection[PredictorEvaluationExecution]

A collection of PredictorEvaluationExecutions.

archive(uid: UUID | str)

Archive a predictor evaluation execution.

Parameters:

uid (Union[UUID, str]) – Unique identifier of the execution to archive

build(data: dict) PredictorEvaluationExecution

Build an individual PredictorEvaluationExecution.

delete(uid: UUID | str) Response

Predictor Evaluation Executions cannot be deleted; they can be archived instead.

get(uid: UUID | str) ResourceType

Get a particular element of the collection.

list(*, per_page: int = 100, predictor_id: UUID | None = None, predictor_version: int | str | None = None) Iterator[PredictorEvaluationExecution]

Paginate over the elements of the collection.

Parameters:
  • per_page (int, optional) – Max number of results to return per page. Default is 100. This parameter is used when making requests to the backend service. If the page parameter is specified it limits the maximum number of elements in the response.

  • predictor_id (uuid, optional) – list executions that targeted the predictor with this id

  • predictor_version (Union[int, str], optional) – list executions that targeted the predictor with this version

Returns:

The matching predictor evaluation executions.

Return type:

Iterator[PredictorEvaluationExecution]

register(model: PredictorEvaluationExecution) PredictorEvaluationExecution

Cannot register an execution.

restore(uid: UUID | str)

Restore an archived predictor evaluation execution.

Parameters:

uid (Union[UUID, str]) – Unique identifier of the execution to restore

trigger(predictor_id: UUID, *, predictor_version: int | str | None = None, random_state: int | None = None)

Trigger a predictor evaluation execution against a predictor.

Parameters:
  • predictor_id (UUID) – ID of the predictor to evaluate.

  • predictor_version (Union[int, str], optional) – The version of the predictor to evaluate.

  • random_state (int, optional) – Seeds the evaluators’ random number generator so that the results are repeatable.

update(model: PredictorEvaluationExecution) PredictorEvaluationExecution

Cannot update an execution.