ppdebreuck / modnet

MODNet: a framework for machine learning materials properties
MIT License
80 stars 34 forks source link

Futureproof compatibility with pymatgen #204

Open ml-evs opened 8 months ago

ml-evs commented 8 months ago

Currently we are in a state where we cannot update pymatgen any further than what is done in #203 without our tests failing. This is because our test data was created with a 2022.* version of pymatgen, and pickled directly by MODData.save(...). Whilst all the information is there to reconstruct the pymatgen objects, several private attributes added to pymatgen in the meantime are missing, so the direct depickling approach fails.

I don't know if we want to hack in our own backwards compatibility with pymatgen, but really we should have a better serialization process that uses something like structure.to_dict() rather than pickle, although this would have to interact with our existing approach of saving MODNet models.