TrainingParameters¶
Included in QATK.MLFF
- class TrainingParameters(experiment_name=None, batch_size=None, max_number_of_epochs=None, patience=None, device=None, random_seed=None, number_of_workers=None, default_dtype=None, learning_rate=None, weight_decay=None, restart_from_last_checkpoint=None, scheduler_patience=None, gradient_clipping_threshold=None, save_all_available_model_formats=None, additional_parameters=None)¶
Constructor for TrainingParameters.
- Parameters:
experiment_name (str) – The name of the training experiment.
batch_size (int) – Number of samples per training batch.
max_number_of_epochs (int) – The maximum number of epochs to train for.
patience (int) – The number of epochs to wait before early stopping.
device (str) – The device to train on. Possible values are MLParameterOptions.DEVICE.AUTOMATIC, MLParameterOptions.DEVICE.CPU, and MLParameterOptions.DEVICE.GPU. Default: MLParameterOptions.DEVICE.AUTOMATIC
random_seed (int) – The random seed for reproducibility.
number_of_workers (int) – The number of workers for data loading.
default_dtype (str) – The default torch data type. Possible values are MLParameterOptions.DTYPE.FLOAT32 and MLParameterOptions.DTYPE.FLOAT64. Default: MLParameterOptions.DTYPE.FLOAT64
learning_rate (float) – The learning rate of optimizer.
weight_decay (float) – The weight decay (L2 penalty).
restart_from_last_checkpoint (bool) – Whether to restart training from last saved checkpoint.
scheduler_patience (int) – The patience of the scheduler.
gradient_clipping_threshold (float) – The gradient clipping threshold.
save_all_available_model_formats (bool) – Whether to export all model formats (CuEq float32/float64, e3nn) instead of only the format used in training.
additional_parameters (dict) – Additional parameters for the MACE model.
- additionalParameters()¶
- Returns:
Additional parameters for the MACE model.
- Return type:
dict
- batchSize()¶
- Returns:
The batch size for training.
- Return type:
int
- defaultDtype()¶
- Returns:
The default torch data type.
- Return type:
str
- device()¶
- Returns:
The device to train on. Whether it is CPU or GPU.
- Return type:
str
- experimentName()¶
- Returns:
The name of the training experiment.
- Return type:
str
- gradientClippingThreshold()¶
- Returns:
The gradient clipping value.
- Return type:
float
- learningRate()¶
- Returns:
The learning rate of optimizer.
- Return type:
float
- maxNumberOfEpochs()¶
- Returns:
The maximum number of epochs to train for.
- Return type:
int
- nlinfo()¶
- Returns:
The nlinfo.
- Return type:
dict
- numberOfWorkers()¶
- Returns:
The number of workers for data loading.
- Return type:
int
- patience()¶
- Returns:
The number of epochs to wait before early stopping.
- Return type:
int
- randomSeed()¶
- Returns:
The random seed.
- Return type:
int
- restartFromLastCheckpoint()¶
- Returns:
Whether to restart training from last saved checkpoint.
- Return type:
bool
- saveAllAvailableModelFormats()¶
- Returns:
Whether to export all model formats (CuEq float32/float64, e3nn) instead of only the format used in training.
- Return type:
bool
- schedulerPatience()¶
- Returns:
The patience of the scheduler.
- Return type:
int
- uniqueString()¶
Return a unique string representing the state of the object.
- weightDecay()¶
- Returns:
The weight decay (L2 penalty).
- Return type:
float