Phase Diagram Serialization Improvement#4414
Phase Diagram Serialization Improvement#4414shyuep merged 13 commits intomaterialsproject:masterfrom
Conversation
|
Thanks @fadams-umd, this seems much more efficient. For backwards compatibility, for those who have already serialized a phase diagram with the older method, could you add an appropriate |
|
Certainly! I just added a check for a dictionary key only present in the old format, and adjusted deserialization accordingly. |
|
We're getting a test failure on |
Head branch was pushed to by a user without write access
|
I was inadvertently modifying the dictionary argument in the |
|
@fadams-umd thanks for working on this! I originally noted this issue when working with patched phase diagrams which inflate this issue even more due to shared copies between patches. The only reasonable way to store them currently is as pickles which is an awful way to persist long term data. |
|
Apologies for the delay in merging this @felix-adams! |
|
Thanks! |
Summary
Addresses #3940 by modifying the serialization of
pymatgen.analysis.phase_diagram.PhaseDiagramto (1) remove redundant copies of the list of all the entries and (2) serialize the subsetqhull_entriesas a list of indices from which the list of entries can be recreated upon deserialization.