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

simai = ansys.simai.core.from_config()
simai.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 doesn’t exist

Return type:

GeomAIProject

list() List[GeomAIProject]#

List all projects available on the server.

Model#

class GeomAIProject#

Provides the local representation of a GeomAI project object.

build_model(configuration: dict | GeomAIModelConfiguration) GeomAIModel#

Launches 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()#

Cancels a build if there is one pending.

Raises:

ProcessingError – If there is no build to cancel

create_workspace(name: str) GeomAIWorkspace#

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

Parameters:

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

data() List[GeomAITrainingData]#

Lists all GeomAITrainingData instances in the project.

delete() None#

Delete the project.

reload() None#

Refresh the object with its representation from the server.

set_as_current_project() None#

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

workspaces() List[GeomAIWorkspace]#

Lists all GeomAIWorkspace instances in the project.

property fields: dict#

Dictionary containing the raw object representation.

property id: str#

ID of the object on the server.

property last_model_configuration: GeomAIModelConfiguration | None#

Last configuration used for model training in this project.

property name: str#

Name of project.