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 as asc

simai_client = asc.from_config()
simai_client.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

iter(filters: dict[str, Any] | list[tuple[str, Literal['EQ', 'LIKE', 'IN', 'GT', 'GTE', 'LT', 'LTE'], Any]] | list[RawSingleFilter] | None = None) SizedIterator[GeomAIWorkspace]#

Iterate over all GeomAIWorkspace objects the server.

Parameters:

filters (dict[str, Any] | list[tuple[str, Literal['EQ', 'LIKE', 'IN', 'GT', 'GTE', 'LT', 'LTE'], ~typing.Any]] | list[~ansys.simai.core.data.types.RawSingleFilter] | None) – Optional Filters to apply.

Returns:

Iterator over all GeomAIWorkspace objects on the server.

Return type:

SizedIterator[GeomAIWorkspace]

list(filters: dict[str, Any] | list[tuple[str, Literal['EQ', 'LIKE', 'IN', 'GT', 'GTE', 'LT', 'LTE'], Any]] | list[RawSingleFilter] | None = None, created_by_me: bool | None = None) 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.

Warning

This feature is deprecated and will be retired in August 2026. Please use get_latent_parameters() instead.

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

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

Download the ZIP file of the model evaluation report for the workspace.

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

get_latent_parameters(file: BinaryIO | RawIOBase | BufferedIOBase | Path | str | PathLike | None = None, n: int | None = None) dict[str, List[float]] | None | BinaryIO#

Get the mapping between geometry names and their latent parameter vectors 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.

  • n (int | None) – Optional number of latent parameters to retrieve per geometry (the length of your latent code). If None, all latent parameters are returned. If specified, each vector is truncated to the first n elements. Must not exceed the number of latent parameters used for model training.

Returns:

None or a binary file-object if a file is specified or a dictionary mapping geometry names to latent parameter vectors otherwise.

Raises:

InvalidArguments – If n exceeds the number of latent parameters used for model training.

Return type:

dict[str, List[float]] | None | BinaryIO

list_predictions() List[GeomAIPrediction]#

Lists all the predictions in the workspace.

reload() None#

Refresh the object with its representation from the server.

rename(new_name: str) None#

Rename the workspace.

Parameters:

new_name (str) – New name to give to the workspace.

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 model_configuration: GeomAIModelConfiguration#

Model configuration used in the workspace.

property name: str#

Name of the workspace.