dralgroup / mlatom

AI-enhanced computational chemistry
http://mlatom.com
Other
59 stars 11 forks source link

MACE interface is out of date #27

Closed m-obispo closed 1 month ago

m-obispo commented 1 month ago

Hello to all!

I'm currently facing issues with the MACE interface currently implemented in MLatom. After creating the mace object and calling mace.train() method to fit the model, everything goes fine until printing the end result and saving the model to disk.

This is the error output:

INFO:root:Training complete
INFO:root:Computing metrics for training, validation, and test sets
INFO:root:Loading checkpoint: MACE_ckpt/MACE_run-34709813_epoch-0.pt
INFO:root:Loaded model from epoch 0
Traceback (most recent call last):
  File "/ssdscratch/matheus/mlatom_828/./mlatom_train.py", line 204, in <module>
    model_S1.train(
  File "/home/matheus/venvs/mlatom/lib/python3.11/site-packages/mlatom/decorators.py", line 55, in func
    return self.mthd(obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matheus/venvs/mlatom/lib/python3.11/site-packages/mlatom/interfaces/mace_interface.py", line 751, in train
    table = create_error_table(
            ^^^^^^^^^^^^^^^^^^^
TypeError: create_error_table() got an unexpected keyword argument 'all_collections'

From what I can see on the source code in mace_interface.py, in line 751 the create_error_table() function is taking values which are not seen in the corresponding MACE source code here. Also, MLatom's mace_interface.py was last updated 9 versions ago, which might explain this disagreement.

dralgroup commented 1 month ago

Interface with MACE was tested and works with version 0.3.2, but unfortunately not with the newer version. Please use this version if you encounter any problem. We might update the interface in the future. Or anyone can do it by creating a pull request...