molprop.training.train_model
- molprop.training.train_model(args, model, datamodule)
Performs the training process, i.e. initializing optimizer and early stopping, for example, looping over epochs and getting the evaluation metrics.
- Parameters:
args – Parameters from defaultconfig.yaml.
model – The model used for the training process.
datamodule – Splits the dataset into three sets: training, validation, test.
- Returns:
Best model of the training process, if the early stopping or max. number of epochs is reached. NoneType: Otherwise.
- Return type:
torch.nn.Module