citrine.resources.descriptors module

class citrine.resources.descriptors.DescriptorMethods(project_id: UUID, session: Session)

Bases: object

A set of methods returning descriptors which require connection to the backend.

from_data_source(*, data_source: DataSource) List[Descriptor]

Get all descriptors associated with a data source.

Parameters:

data_source (DataSource) – A CSVDataSource or AraTableDataSource to get descriptors for.

Returns:

The list of descriptors associated with the given data_source.

Return type:

List[Descriptor]

from_predictor_responses(*, predictor: GraphPredictor | PredictorNode, inputs: List[Descriptor]) List[Descriptor]

Get responses for a predictor, given an input space.

Parameters:
  • predictor (Union[Predictor, PredictorNode]) –

    Either a single predictor node or full predictor

    whose available responses are to be computed.

  • inputs (List[Descriptor]) – The input space to the predictor.

Returns:

The computable responses of the predictor given the provided input space (as descriptors).

Return type:

List[Descriptor]