Workspaces
Workspaces are a set of specific geometries, predictions, and postprocessings.
Each workspace uses a specific kernel.
You use the SimAIClient.set_current_workspace()
method to set the workspace that the client is configured for.
Directory
-
class WorkspaceDirectory
Provides a collection of methods related to workspaces.
This class is accessed through client._workspaces
.
Example
import ansys.simai.core
simai = ansys.simai.core.from_config()
simai.workspaces.list()
-
create(name: str, model_id: str) → Workspace
Create a workspace.
- Parameters:
-
-
delete(workspace: Workspace | str) → None
Delete a workspace.
- Parameters:
workspace (Workspace | str) – ID or model
of the workspace.
-
get(id: str | None = None, name: str | None = None) → Workspace
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:
Workspace.
- Raises:
NotFoundError – No geometry with the given ID exists.
- Return type:
Workspace
-
list() → List[Workspace]
List all workspaces from the server.
Model
-
class Workspace
Provides the local representation of a workspace object.
-
delete()
Delete the workspace.
-
download_mer_data(file: BinaryIO | RawIOBase | BufferedIOBase | Path | str | PathLike | None = None) → None | BinaryIO
Download the names, subsets and plotting data of the files used in the AI model and MER 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
-
download_model_evaluation_report(file: BinaryIO | RawIOBase | BufferedIOBase | Path | str | PathLike | None = None) → None | BinaryIO
Download the PDF 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
-
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 model: ModelManifest
Deprecated alias to model_manifest
.
-
property model_manifest: ModelManifest
ModelManifest
instance containing
information about the model associated with the workspace.
-
property name: str
Name of the workspace.
ModelManifest
-
class ModelManifest
Provides information about a model associated with a workspace.
-
property boundary_conditions: Dict[str, Any]
Information on the boundary conditions expected by the model. For example, the prediction’s input.
-
property description: str
Short description of the model.
-
property geometry: Dict[str, Any]
Information on the geometry format expected by the model.
-
property name: str
Name of the model.
-
property physical_quantities: Dict[str, Any]
Information on the physical quantities generated by the model. For example, the prediction’s output.
-
property post_processings: List[Dict[str, Any]]
Information on the postprocessings available for the model
and the accepted parameters when relevant.