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:
project (GeomAIProject | str) – The GeomAI project in which to run the training.
configuration (dict | GeomAIModelConfiguration) – a
GeomAIModelConfigurationobject that contains the properties to be used in the build.
Examples
import ansys.simai.core as asc from ansys.simai.core.data.geomai.models import GeomAIModelConfiguration simai_client = asc.from_config() project = simai_client.geomai.projects.get("new_secret_project") configuration = GeomAIModelConfiguration(build_preset="default") model = simai_client.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.
- wait(timeout: float | None = None) bool#
Wait for all jobs concerning the object to either finish or fail.
- 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 has_failed#
Boolean indicating if the creation of the object failed.
See also
- property is_pending#
Boolean indicating if the object is still in creation. The value becomes
Falseonce object creation is either successful or has failed.See also
- property is_ready#
Boolean indicating if the object has finished creating without error.
See also
GeomAIModelConfiguration#
- pydantic model GeomAIModelConfiguration#
Raises
InvalidArgumentsif 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.
debug: 4 minutes + 15 sec per geometry.short: 45 minutes + 15 sec per geometry.default: 3 hours + 15 sec per geometry.long: 15 hours + 15 sec per geometry.
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.
- field nb_latent_param: int = 512#
An optional integer that defines the dimension of the latent space between 2 and 1024.
Warning
The default value of 512 is highly recommended if you are a non-expert user.
If you are an expert user, ready to experiment and assess correctly your models performance for different latent parameter value, and your use case has specific constraints, you can change this parameter, keeping the following in mind:
If the number is too low, geometries might become too coarse, and the reconstruction performance might degrade.
If the number is too high, the model will not be able to generate new geometries correctly.
The default value of
512is used ifnb_latent_paramis not set.