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:
name (str) – Name to give the new workspace.
project (GeomAIProject | str) – ID or
projectof the workspace.
- delete(workspace: GeomAIWorkspace | str) None#
Delete a workspace.
- Parameters:
workspace (GeomAIWorkspace | str) – ID or
modelof 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:
- Returns:
- Raises:
NotFoundError – No workspace with the given ID exists.
- Return type:
- 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
GeomAIWorkspaceobjects 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.
- 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.
- 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 firstnelements. Must not exceed the number of latent parameters used for model training.
- Returns:
Noneor a binary file-object if a file is specified or a dictionary mapping geometry names to latent parameter vectors otherwise.- Raises:
InvalidArguments – If
nexceeds the number of latent parameters used for model training.- Return type:
- list_predictions() List[GeomAIPrediction]#
Lists all the predictions in the workspace.
- 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 model_configuration: GeomAIModelConfiguration#
Model configuration used in the workspace.