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
GeomAIModelConfiguration
object that contains the properties to be used in the build.
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.
- 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
False
once 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
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