GeomAIProjects#

Projects are a selection of training data used to train a model.

Directory#

class GeomAIProjectDirectory#

Provides a collection of methods related to projects.

This class is accessed through client.projects.

Example

List all projects:

import ansys.simai.core as asc

simai_client = asc.from_config()
simai_client.geomai.projects.list()
cancel_build(project: GeomAIProject | str)#

Cancel a build if one is in progress.

Parameters:

project (GeomAIProject | str) – ID or model of the project.

create(name: str) GeomAIProject#

Create a project.

delete(project: GeomAIProject | str) None#

Delete a project.

Parameters:

project (GeomAIProject | str) – ID or model of the project.

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

Get a project by either ID or name.

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

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

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

Returns:

GeomAIProject instance with the given ID if it exists.

Raises:

NotFoundError – If the project does not exist.

Return type:

GeomAIProject

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

Iterate over all GeomAIProject objects on 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 GeomAIProject available on the server.

Return type:

SizedIterator[GeomAIProject]

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[GeomAIProject]#

List all GeomAIProject objects on the server.

Model#

class GeomAIProject#

Provides the local representation of a GeomAI project object.

build_model(configuration: dict | GeomAIModelConfiguration) GeomAIModel#

Launch a GeomAI build with the given configuration.

Parameters:

configuration (dict | GeomAIModelConfiguration) – The configuration to run the model with. See models.GeomAIModelConfiguration for details.

cancel_build()#

Cancel a build if there is one pending.

Raises:

ProcessingError – If there is no build to cancel.

create_workspace(name: str) GeomAIWorkspace#

Create a workspace using the latest model trained in this project.

Parameters:

name (str) – Name to give to the new workspace.

data() List[GeomAITrainingData]#

(Deprecated) List all GeomAITrainingData instances in the project.

Use list_training_data() instead.

delete() None#

Delete the project.

get_last_workspace() GeomAIWorkspace | None#

Get the last generated workspace of the project.

list_models() List[GeomAIModel]#

List all GeomAIModel instances in the project.

list_training_data() List[GeomAITrainingData]#

List all GeomAITrainingData instances in the project.

list_workspaces() List[GeomAIWorkspace]#

List all GeomAIWorkspace instances in the project.

reload() None#

Refresh the object with its representation from the server.

rename(new_name: str) None#

Rename the project.

Parameters:

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

set_as_current_project() None#

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

workspaces() List[GeomAIWorkspace]#

(Deprecated) List all GeomAIWorkspace instances in the project.

Use list_workspaces() instead.

property fields: dict#

Dictionary containing the raw object representation.

property id: str#

ID of the object on the server.

property last_model: GeomAIModel | None#

Last model launched in the project.

property last_model_configuration: GeomAIModelConfiguration | None#

Last configuration used for model training in this project.

property name: str#

Name of project.