metatensor / metatrain

Training and evaluating machine learning models for atomistic systems.
https://metatensor.github.io/metatrain/
BSD 3-Clause "New" or "Revised" License
18 stars 6 forks source link

best_val_mae_both_model is not written if do_forces = MLIP_SETTINGS.USE_FORCES = False #397

Closed DavideTisi closed 2 days ago

DavideTisi commented 1 week ago

Try to fix #394, the main source of error is in cosmo-pet and at least the fix in #6 is needed to the train to start, the change in this PR is required to finish the training since as in the title best_val_mae_both_model is not written if do_forces = MLIP_SETTINGS.USE_FORCES = False


📚 Documentation preview 📚: https://metatrain--397.org.readthedocs.build/en/397/

abmazitov commented 1 week ago

Thank you @DavideTisi ! It is actually my bad, because I initially wanted it to be like

if do_forces:
    load_path = self.pet_dir / "best_val_mae_both_model_state_dict"
else:
    load_path = self.pet_dir / "best_val_mae_energies_model_state_dict"

but messed it up a bit because for one second I thought that "do_forces" means "do_ONLY_forces". Could you please change as I suggested? It is the standard way we export our models (with forces and best_mae_both_state_dict).

DavideTisi commented 6 days ago

now that cosmo-pet #6 is merge we can merge also this one. if you are ok with it @frostedoyster @abmazitov

abmazitov commented 4 days ago

399 is merged, so this PR can be merged as well (after being updated OFC)