anatools.anaclient.gan module

GAN Functions

add_gan_organization(self, modelId, organizationId)

Add access to a map for an organization.

Parameters
  • modelId (str) – ModelId to add access for.

  • organizationId (str) – Organization ID to add access

Returns

Status

Return type

bool

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

Create a new GAN dataset based off an existing dataset. This will start a new job.

Parameters
  • modelId (str) – Model ID to use for the GAN.

  • datasetId (str) – Dataset ID to input into the GAN.

  • workspaceId (str) – Workspace ID where the dataset exists.

Returns

The datsetId for the GAN Dataset job.

Return type

str

create_managed_gan(self, name, description, modelfile, flags=None, organizationId=None)

Uploades a GAN model to the microservice. The model will be owned by the specified organization. If organizationId is not given the model will be owned by that of the analcient.

Parameters
  • name (str) – A name for model.

  • description (str) – Details about the model.

  • modelfile (str) – The file of the model - relative to the local directry.

  • flags (str) – Parameters for use when running the model.

  • organizationId (str) – Id of organization that owns the model, that of the anaclient if not given.

Returns

modleId – The unique identifier for this model.

Return type

str

delete_gan_dataset(self, datasetId, workspaceId=None)

Deletes a GAN dataset job.

Parameters
  • datasetId (str) – Dataset ID for the GAN dataset.

  • workspaceId (str) – Workspace ID where the dataset exists.

Returns

Returns true if the GAN dataset was successfully deleted.

Return type

bool

delete_gan_model(self, modelId)

Delete the GAN model and remove access to it from all shared organizations. This can only be done by a user in the organization that owns the model.

Parameters

modelId (str) – The ID of a specific GAN model.

Returns

Status

Return type

str

delete_managed_gan(self, modelId)

Removes the managed map

Parameters

modelId (str) – The ID of a specific Model to delete.

Returns

Status

Return type

bool

edit_managed_gan(self, modelId, name=None, description=None, flags=None)

Edits the name, description, and flags of a managed gan.

Parameters
  • modelId (str) – The modelId that will be updated.

  • name (str) – The new name of the managed gan. Note: this name needs to be unique per organization.

  • description (str) – Description of the managed gan

  • flags (str) – Flags for the model

Returns

Status

Return type

bool

get_gan_dataset(self, datasetId, workspaceId=None)

Retrieve information about GAN dataset jobs.

Parameters
  • datasetId (str) – Dataset ID to retrieve information for.

  • workspaceId (str) – Workspace ID where the dataset exists.

Returns

Information about the GAN Dataset.

Return type

list[dict]

get_gan_models(self, organizationId=None, workspaceId=None, modelId=None)

Retrieve information about GAN models

Parameters
  • organizationId (str) – Organization ID that owns the models

  • workspaceId (str) – Workspace ID that contains the models

  • modelId (str) – Model ID to retrieve information for.

Returns

GAN Model information.

Return type

list[dict]

get_managed_gans(self, organizationId=None, modelId=None)

Retrieves the managed GANs for an organization.

Parameters
  • organizationId (str) – The ID of the organization that the managed GAN belongs to.

  • modelId (str) – The ID of a specific model.

Returns

Model Info

Return type

list[dict]

remove_gan_organization(self, modelId, organizationId)

Remove access to a map for an organization.

Parameters
  • modelId (str) – ModelId to remove access to.

  • organizationId (str) – Organization ID to remove access.

Returns

Status

Return type

bool