anatools.anaclient.ml module

Machine Learning Functions

create_ml_inference(self, datasetId, modelId, mapId, workspaceId=None)

Create a new machine learning inference job.

Parameters
  • datasetId (str) – Dataset ID

  • modelId (str) – Model ID

  • mapId (str) – Map ID

  • workspaceId (str) – Workspace ID

Returns

Inference ID

Return type

str

create_ml_model(self, datasetId, architectureId, name, description, parameters, workspaceId=None)

Creates a new machine learning model.

Parameters
  • architectureId (str) – Architecture ID

  • datasetId (str) – Dataset ID

  • name (str) – Model name

  • description (str) – Model description

  • paramters (str) – JSON string of model parameters

  • workspaceId (str) – Workspace ID

Returns

Machine learning model ID

Return type

str

delete_ml_inference(self, inferenceId, workspaceId=None)

Deletes or cancels a machine learning inference job.

Parameters
  • inferenceId (str) – Inference ID

  • workspaceId (str) – Workspace ID

Returns

Success / failure

Return type

bool

delete_ml_model(self, modelId, workspaceId=None)

Deletes or cancels a machine learning model.

Parameters
  • modelId (str) – Model ID

  • workspaceId (str) – Workspace ID

Returns

Success / failure

Return type

bool

download_ml_inference(self, inferenceId, localDir=None, workspaceId=None)

Download the inference detections.

Parameters
  • inferencId (str) – Inference ID

  • localDir (str) – Local directory to save the model

  • workspaceId (str) – Workspace ID

Returns

Success / failure

Return type

bool

download_ml_model(self, modelId, localDir=None, workspaceId=None)

Download the machine learning model.

Parameters
  • modelId (str) – Model ID

  • localDir (str) – Local directory to save the model

  • workspaceId (str) – Workspace ID

Returns

Success / failure

Return type

bool

edit_ml_model(self, modelId, name, description, workspaceId=None)

Edit the name or description of a machine learning model.

Parameters
  • modelId (str) – Model ID

  • name (str) – Model name

  • description (str) – Model description

  • workspaceId (str) – Workspace ID

Returns

Success / failure

Return type

bool

get_ml_architectures(self)

Retrieves the machine learning model architectures available on the platform.

Parameters

None

Returns

Machine learning model architectures

Return type

dict

get_ml_inference_metrics(self, inferenceId, workspaceId=None)

Get the metrics from an inference job.

Parameters
  • inferenceId (str) – Inference ID

  • workspaceId (str) – Workspace ID

Returns

Metric data

Return type

dict

get_ml_inferences(self, inferenceId=None, datasetId=None, modelId=None, workspaceId=None)

Get the inferences of a machine learning model.

Parameters
  • inferenceId (str) – Inference ID

  • datasetId (str) – Dataset ID

  • modelId (str) – Model ID

  • workspaceId (str) – Workspace ID

Returns

Inference data

Return type

dict

get_ml_models(self, workspaceId=None, datasetId=None, modelId=None)

Retrieves the machine learning model architectures available on the platform.

Parameters
  • workspaceId (str) – Workspace ID

  • datasetId (str) – Dataset ID

  • modelId (str) – Model ID

Returns

Machine learning model architectures

Return type

dict

upload_ml_model(self, name, description, modelfile, parameters, workspaceId=None)

Upload a machine learning model.

Parameters
  • name (str) – Model name

  • description (str) – Model description

  • modelfile (str) – The filepath of the model file

  • parameters (str) – Model training parameters

  • workspaceId (str) – Workspace ID

Returns

Success / failure

Return type

bool