citrine.resources.predictor_evaluation_workflow module

Resources that represent both individual and collections of workflow executions.

class citrine.resources.predictor_evaluation_workflow.PredictorEvaluationWorkflowCollection(project_id: UUID, session: Session)

Bases: Collection[PredictorEvaluationWorkflow]

A collection of PredictorEvaluationWorkflows.

archive(uid: UUID | str)

Archive a predictor evaluation workflow.

Parameters:

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

build(data: dict) PredictorEvaluationWorkflow

Build an individual PredictorEvaluationExecution.

create_default(*, predictor_id: UUID, predictor_version: int | str | None = None) PredictorEvaluationWorkflow

Create a default predictor evaluation workflow for a predictor and execute it.

The current default predictor evaluation workflow performs 5-fold, 1-trial cross-validation on all valid predictor responses. Valid responses are those that are not produced by the following predictors:

If there are no valid responses, a default workflow is not created.

Parameters:
  • predictor_id (UUID) – Unique identifier of the predictor used to create a default workflow

  • predictor_version (Option[Union[int, str]]) – The version of the predictor used to create a default workflow

Returns:

Default workflow

Return type:

PredictorEvaluationWorkflow

delete(uid: UUID | str) Response

Predictor Evaluation Workflows 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) Iterator[ResourceType]

Paginate over the elements of the collection.

Leaving page and per_page as default values will yield all elements in the collection, paginating over all available pages.

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.

Returns:

An iterator that can be used to loop over all the resources in this collection. Use list() to force evaluation of all results into an in-memory list.

Return type:

Iterator[ResourceType]

register(model: CreationType) CreationType

Create a new element of the collection by registering an existing resource.

restore(uid: UUID | str | None = None)

Restore an archived predictor evaluation workflow.

Parameters:

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

update(model: CreationType) CreationType

Update a particular element of the collection.