materialsproject / emmet

Be a master builder of databases of material properties. Avoid the Kragle.
https://materialsproject.github.io/emmet/
Other
49 stars 63 forks source link

Bug: Information is lost on Pydantic `.model_dump()` in `TaskDoc` #959

Closed Andrew-S-Rosen closed 4 months ago

Andrew-S-Rosen commented 4 months ago

Problem

from emmet.core.tasks import TaskDoc
vasp_task_doc=TaskDoc.from_directory('.')
vasp_task_doc.model_dump()["structure_entry"]

The dumped model does not contain the "structure_entry" data even though it is present as an attribute in the Pydantic model.

Proposed Solution

Not immediately sure.

Alternatives

No response

Andrew-S-Rosen commented 4 months ago

Sorry for another false report. I see this is because it's a @propery...