GeomAIWorkspaces#

Workspaces are a set of specific predictions. Each workspace uses a specific model.

You use the GeomAIClient.set_current_workspace() method to set the workspace that the client is configured for.

Directory#

class GeomAIWorkspaceDirectory#

Provides a collection of methods related to GeomAI workspaces.

This class is accessed through client.geomai.workspaces.

Example

import ansys.simai.core

simai = ansys.simai.core.from_config()
simai.geomai.workspaces.list()
create(name: str, project: GeomAIProject | str) GeomAIWorkspace#

Create a workspace.

Parameters:
delete(workspace: GeomAIWorkspace | str) None#

Delete a workspace.

Parameters:

workspace (GeomAIWorkspace | str) – ID or model of the workspace.

get(id: str | None = None, name: str | None = None) GeomAIWorkspace#

Get a specific workspace object from the server by either ID or name.

You can specify either the ID or the name, not both.

Parameters:
  • id (str | None) – ID of the workspace.

  • name (str | None) – Name of the workspace.

Returns:

A GeomAIWorkspace.

Raises:

NotFoundError – No workspace with the given ID exists.

Return type:

GeomAIWorkspace

list() List[GeomAIWorkspace]#

List all workspaces from the server.

Model#

class GeomAIWorkspace#

Provides the local representation of a GeomAI workspace object.

delete()#

Delete the workspace.

download_latent_parameters_json(file: BinaryIO | RawIOBase | BufferedIOBase | Path | str | PathLike | None = None) None | BinaryIO#

Download the json file containing the latent parameters for the model’s training data.

Parameters:

file (BinaryIO | RawIOBase | BufferedIOBase | Path | str | PathLike | None) – Binary file-object or the path of the file to put the content into.

Returns:

None if a file is specified or a binary file-object otherwise.

Return type:

None | BinaryIO

list_predictions() List[GeomAIPrediction]#

Lists all the predictions in the workspace.

reload() None#

Refresh the object with its representation from the server.

set_as_current_workspace() None#

Configure the client to use this workspace instead of the one currently configured.

property fields: dict#

Dictionary containing the raw object representation.

property id: str#

ID of the object on the server.

property name: str#

Name of the workspace.