# TrainingSet with precomputed Energy Forces (and Stress if present and desired) data. This can be
# one or more TrainingSets
training_set = nlread('My_TrainingSet_Data.hdf5', TrainingSet)

# Fetch the calculator from the training set. If not present, it should be retrieved from
# elsewhere/set up analogously to calculate isolated atom energies
calculator = training_set.calculator()

# Setup model specific fitting parameters object for the training
mace_fp = MACEFittingParameters(
    # Name of the model - has to be set
    experiment_name='mace_experiment',
    # Other parameters can be set as desired
    # number_of_channels=32,
    # ...
)

# Setup ML model training object
mlfft = MachineLearnedForceFieldTrainer(
    fitting_parameters=mace_fp,
    training_sets=training_set,
    calculator=calculator,
    # Optional parameters can be set as desired
    train_test_split=0.8,
    random_seed=1234,
)

# Run the training
mlfft.train()
