class milkstraw_client.model.Model(id: str, name: str, status: str, source_data: str)[source]

Bases: object

Handles interactions with generative models backend APIs.

This class provides methods to create, retrieve, and list models.

id

The unique identifier of the model.

Type:

str

name

The name of the model.

Type:

str

status

The status of the model.

Type:

str

source_data

The ID of the source data used to train the model.

Type:

str

static create(name: str, source_data: str, auto_anonymize_personal_info: bool | None = None, anonymize_personal_info_columns: list[str] | None = None) Model[source]

Create a new generative model.

Parameters:
  • name (str) – The name of the model.

  • source_data (str) – The ID of the source data used to train the model.

  • auto_anonymize_personal_info (bool, optional) – Whether to automatically anonymize personal information in the source data. Defaults to None.

  • anonymize_personal_info_columns (list of str, optional) – A list of column names to be anonymized in the source data. Defaults to None.

Returns:

An instance of the Model class representing the created model.

Return type:

Model

static get(id: str) Model[source]

Retrieve a generative model by its unique identifier.

Parameters:

id (str) – The unique identifier of the model.

Returns:

An instance of the Model class representing the retrieved model.

Return type:

Model

static list() list[milkstraw_client.model.Model][source]

List all available generative models.

Returns:

A list of Model instances representing the available models.

Return type:

list[Model]