Projects#
Projects are a selection of training data used to train a model.
Directory#
- class ProjectDirectory#
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.projects.list()
Model#
- class Project#
Provides the local representation of a project object.
- cancel_build()#
Cancels a build if there is one pending.
- get_variables() dict[str, list[str]] | None #
Get the available variables for the model’s input/output.
- is_trainable() IsTrainableInfo #
Check if the project meets the prerequisites to be trained.
- process_gc_formula(gc_formula: str, bc: list[str] = None, surface_variables: list[str] = None) float | None #
Process the formula of a global coefficient according to the project sample. It handles checking and computing the global coefficient formula as one workflow.
- set_as_current_project() None #
Configure the client to use this project instead of the one currently configured.
- property data: list[TrainingData]#
List of all
TrainingData
instances in the project.
- property last_model_configuration: ModelConfiguration | None#
Last
configuration
used for model training in this project.
- property sample: TrainingData | None#
Sample of the project. The sample determines what variable and settings are available during model configuration.
- property training_capabilities: TrainingCapabilities#
Training capabilities of the project. Determines whether a project can use continuous learning.
IsTrainableInfo#
- class IsTrainableInfo#
Properties for project’s trainability.
The objects of this class can be used as booleans in condition statements as in the example:
Example
Verify the project is trainable
pt = my_project.is_trainable() if pt: print(pt)
It prints:
<is_trainable: False, reason(s): Not enough data to train a model: we need at least 3 data points to train a model.>
- reason#
If not_trainable is False, the reason why the project is not trainable. None otherwise.
- Type:
Create new instance of IsTrainableInfo(is_trainable, reason)
TrainingCapabilities#
- class TrainingCapabilities#
Provides a project’s training capabilities.
- Parameters:
continuous_learning (ContinuousLearningCapabilities) – Continuous learning capabilities.