GeomAIModels#

To build a GeomAI model, use GeomAIProject.build_model.

Directory#

class GeomAIModelDirectory#

Provides a collection of methods related to building models.

build(project: GeomAIProject | str, configuration: dict | GeomAIModelConfiguration) GeomAIModel#

Launches a GeomAI build with the given configuration.

Parameters:

Examples

import ansys.simai.core
from ansys.simai.core.data.geomai.models import GeomAIModelConfiguration

simai = ansys.simai.core.from_config()
project = simai.geomai.projects.get("new_secret_project")
configuration = GeomAIModelConfiguration(build_preset="default", nb_latent_param=10)
model = simai.geomai.models.build(project, configuration)

Use a previous configuration for a new build in the same project:

a_project = simai.geomai.projects.get("project_A")
build_conf = a_project.last_model_configuration
new_model = simai.geomai.models.build(build_conf)

Use a previous configuration for a new build in another project:

a_project = simai.geomai.projects.get("project_A")
build_conf = a_project.last_model_configuration
b_project = simai.geomai.projects.get("project_B")
new_model = simai.geomai.models.build(build_conf)

Model#

class GeomAIModel#

GeomAI model representation.

reload() None#

Refresh the object with its representation from the server.

wait(timeout: float | None = None) bool#

Wait for all jobs concerning the object to either finish or fail.

Parameters:

timeout (float | None) – Maximum amount of time in seconds to wait. The default is None, it means that there is no maximum on the time to wait.

Returns:

True if the computation has finished, False if the operation timed out.

Return type:

bool

property configuration: GeomAIModelConfiguration#

Build configuration of a model.

property failure_reason#

Optional message giving the causes for why the creation of the object failed.

See also

property fields: dict#

Dictionary containing the raw object representation.

property has_failed#

Boolean indicating if the creation of the object failed.

property id: str#

ID of the object on the server.

property is_pending#

Boolean indicating if the object is still in creation. The value becomes False once object creation is either successful or has failed.

property is_ready#

Boolean indicating if the object has finished creating without error.

property project_id: str#

The ID of the GeomAI project where the model exists.

GeomAIModelConfiguration#

pydantic model GeomAIModelConfiguration#

Raises InvalidArguments if the input data cannot be validated to from a valid model.

field build_preset: Literal['debug', 'short', 'default', 'long'] | None = None#

The preset to use for the model training duration. One of debug, short, default, long.

  • short duration should last approximately 10 minutes.

  • long duration should last a few hours at most.

Mutually exclusive with nb_epochs.

field nb_epochs: int | None = None#

The number of times each training data is seen by the model during the training, between 1 and 1000.

Mutually exclusive with build_preset.

Constraints:
  • ge = 1

  • le = 1000

field nb_latent_param: int [Required]#

This number defines the number of floats that will be listed in the latent_params parameter for prediction. It has to be defined according to the complexity and the diversity of the geometries you used as training data.

You need to find the smallest number of latent parameters enabling the model to rebuild a training data with a similar level of detail as the original geometry.

  • If the number is too low, the generated geometries will be too coarse.

  • If the number is too high, the model will not be able to generate consistent geometries.

In most cases, the optimal number of latent parameters is lower than 20.

Constraints:
  • ge = 2

  • le = 256