materialsvirtuallab / matgl

Graph deep learning library for materials
BSD 3-Clause "New" or "Revised" License
233 stars 57 forks source link

[Bug]: Urgent! ValueError: Bad serialized model or bad model name #193

Closed janosh closed 7 months ago

janosh commented 7 months ago

Email (Optional)

No response

Version

0.8.5

Which OS(es) are you using?

What happened?

matgl is holding up the whole MP stack with this error

ValueError: Bad serialized model or bad model name. It is possible that you have an older model cached. Please clear your cache by running python -c "import matgl; matgl.clear_cache()"

/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/matgl/utils/io.py:213:

It's affecting pymatgen, atomate2, matcalc, emmet, ... Please add tests for whatever broke so this doesn't happen again!

Code snippet

No response

Log output

No response

Code of Conduct

shyuep commented 7 months ago

Erm, I think the error message says it all? @kenko911 You need to change the model number when you make internal changes like the stress computation. Otherwise the loading of the models can be wrong.

janosh commented 7 months ago

How come there's no test that caught this?

ucarh commented 5 months ago

I had this error with python 3.12, downgrading it to 3.9 solved the issue.

shyuep commented 5 months ago

DGL (the underlying dependency) is not even available on py3.12. In general, we would recommend using Py3.10 (or at most one version below the latest Python, which usually has bugs as well as a lot of unsupported dependencies).