Models (Pre-Alpha)

Models

Models is a client for interacting with registered models and tracking the status of jobs.


class Models(currier_client: descarteslabs.common.currier.client.CurrierGrpcClient = None)[source]

Models is a client for interacting with registered models and tracking the status of jobs.

Methods:

get_model(model_name)

Gets ModelSpec from model name.

get_status(work_id)

Gets the status of a job

invoke(model_name, parameters)

Invokes a model model_name with specified tuning parameters.

get_model(model_name: str) → descarteslabs.common.services.currier.spec.internal.ModelSpec[source]

Gets ModelSpec from model name.

Parameters

model_name (str) – Name of model to fetch.

Returns

model_spec – Deserialized ModelSpec object.

Return type

ModelSpec

get_status(work_id: str) → Dict[str, float][source]

Gets the status of a job

Parameters

work_id (str) – Work ID of the job to check the status on.

Returns

status – Percentages for work pending, running, cancelled, successful and failed.

Return type

Dict[str, float]

invoke(model_name: str, parameters: Dict[str, Any]) → str[source]

Invokes a model model_name with specified tuning parameters.

Parameters
  • model_name (str) – Name of model to invoke.

  • parameters (Dict[str, Any]) – Input parameters for the model.

Returns

work_id – Work ID of the invoked job. This can be used for checking the status of the work with get_status.

Return type

str