citrine.informatics.predictors.graph_predictor module

class citrine.informatics.predictors.graph_predictor.GraphPredictor(*args, **kwargs)

Bases: VersionedEngineResource[GraphPredictor], AsynchronousObject, Predictor

A predictor interface that stitches individual predictor nodes together.

The GraphPredictor is the only predictor that can be registered on the Citrine Platform and carries along its meta-data regarding versioning, platform identifiers, and updates.

Parameters:
  • name (str) – name of the configuration

  • description (str) – the description of the predictor

  • predictors (List[Union[UUID, PredictorNode]],) – the list of individual predictors to use in the graph

  • training_data (Optional[List[DataSource]]) – Optional sources of training data shared by all predictors in the graph. Training data provided by this graph predictor does not need to be specified as part of the configuration of sub-predictors. Shared training data and any training data specified by a sub-predictor will be combined into a flattened list and de-duplicated by uid and identifiers. De-duplication is performed if a uid or identifier is shared between two or more rows. The content of a de-duplicated row will contain the union of data across all rows that share the same uid or at least 1 identifier.

access_control_dict() dict

Return an access control entity representation of this resource. Internal use only.

classmethod build(data: dict)

Build an instance of this object from given data.

classmethod build_with_parent(data: dict, base_cls) Self
dump() dict

Dump this instance.

failed() bool

Whether the backend process has completed unsuccessfully.

in_progress() bool

Whether the backend process is in progress.

predict(predict_request: SinglePredictRequest) SinglePrediction

Make a one-off prediction with this predictor.

succeeded() bool

Whether the backend process has completed successfully.

static wrap_instance(predictor_data: dict) dict

Insert a serialized embedded predictor into a module envelope.

This facilitates deserialization.

archive_time = None

date and time at which the resource was archived, if it has been archived

Type:

Optional[datetime]

archived_by = None

id of the user who archived the resource, if it has been archived

Type:

Optional[UUID]

create_time = None

date and time at which the resource was created

Type:

Optional[datetime]

created_by = None

id of the user who created the resource

Type:

Optional[UUID]

description: str = None
draft = None
property is_archived

whether the resource is archived (hidden but not deleted).

Type:

bool

name: str = None
predictors: List[PredictorNode] = None
property report

Fetch the predictor report.

status = None

short description of the resource’s status

Type:

Optional[str]

status_detail = []

a list of structured status info, containing the message and level

Type:

List[StatusDetail]

training_data: List[DataSource] = []
uid = None

Citrine Platform unique identifier

Type:

Optional[UUID]

update_time = None

date and time at which the resource was most recently updated, if it has been updated

Type:

Optional[datetime]

updated_by = None

id of the user who most recently updated the resource, if it has been updated

Type:

Optional[UUID]

version = None

The draft status of the resource.

Type:

Boolean