Models#
A collection of classes for building a SimAI model.
Launching a build requires a configuration
(ModelConfiguration
)
which defines the model properties, such as its inputs and outputs,
the Global Coefficients and the Domain of Analysis, and its project. The
ModelConfiguration
object is, then, parsed to models.build()
for
launching a build.
Directory#
- class ModelDirectory#
Provides a collection of methods related to building models.
- build(configuration: ModelConfiguration, dismiss_data_with_fields_discrepancies: bool = False, dismiss_data_with_volume_overflow: bool = False, dismiss_data_input_with_nan: bool = False)#
Launches a build given a configuration.
- Parameters:
configuration (ModelConfiguration) – a ModelConfiguration object that contains the properties to be used in the build
dismiss_data_with_fields_discrepancies (bool) – set to True for omitting data with missing properties
dismiss_data_with_volume_overflow (bool) – set to True for omitting data outside the Domain of Analysis
dismiss_data_input_with_nan (bool) – set to True for omitting data with inputs containing NaN values
Example
Use a previous configuration for a new build in the same project
a_project = simai.projects.get("project_A") build_conf = a_project.last_model_configuration new_model = simai.models.build(build_conf)
Use a previous configuration for a new build in another project
a_project = simai.projects.get("project_A") build_conf = a_project.last_model_configuration b_project = simai.projects.get("project_B") # set the id of b_project as the project_id of the configuration build_conf.project = b_project new_model = simai.models.build(build_conf)
Model#
- class Model#
Training model representation.
- wait(timeout: float | None = None) bool #
Wait for all jobs concerning the object to either finish or fail.
- property configuration: ModelConfiguration#
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