Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write out results schema to filesystem in summarize functions #1729

Merged
merged 27 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c9c2cea
initial?
tomdemeyere Feb 19, 2024
e5a41d5
json
tomdemeyere Feb 20, 2024
da94535
Merge branch 'main' into pickle
Andrew-S-Rosen Feb 29, 2024
c200f45
Merge branch 'main' into pickle
Andrew-S-Rosen Feb 29, 2024
a54ece1
Merge branch 'main' into pickle
Andrew-S-Rosen Feb 29, 2024
9f1afbc
Merge branch 'main' into pickle
Andrew-S-Rosen Feb 29, 2024
4a481f4
results.json --> quacc_results.json
Andrew-S-Rosen Mar 2, 2024
a90f159
Update requirements.txt
Andrew-S-Rosen Mar 3, 2024
d7a7330
Merge branch 'main' into pickle
Andrew-S-Rosen Mar 3, 2024
6ca1ecd
Try `jsanitize`-ing
Andrew-S-Rosen Mar 4, 2024
5601523
pre-commit auto-fixes
pre-commit-ci[bot] Mar 4, 2024
ae83ee2
Update requirements.txt
Andrew-S-Rosen Mar 4, 2024
7799761
fix
Andrew-S-Rosen Mar 4, 2024
8b2b3b3
fix
Andrew-S-Rosen Mar 4, 2024
2835c8a
fix
Andrew-S-Rosen Mar 4, 2024
5467c04
Revisit the pickle approach
Andrew-S-Rosen Mar 4, 2024
1b770cc
Merge branch 'main' into pickle
Andrew-S-Rosen Mar 4, 2024
04558ad
fix precommit
Andrew-S-Rosen Mar 4, 2024
9eae881
Merge branch 'main' into pickle
Andrew-S-Rosen Mar 4, 2024
4bed411
Merge branch 'main' into pickle
Andrew-S-Rosen Mar 4, 2024
85c9f49
fix
Andrew-S-Rosen Mar 4, 2024
fdaf32e
fix
Andrew-S-Rosen Mar 4, 2024
144547f
Merge branch 'main' into pickle
Andrew-S-Rosen Mar 4, 2024
833d586
fix
Andrew-S-Rosen Mar 4, 2024
67bf50b
Merge branch 'main' into pickle
Andrew-S-Rosen Mar 4, 2024
376f46a
Merge branch 'main' into pickle
tomdemeyere Mar 17, 2024
fb50d1f
tests !!!
tomdemeyere Mar 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/quacc/schemas/ase.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

import pickle
from typing import TYPE_CHECKING

import numpy as np
Expand Down Expand Up @@ -119,6 +120,10 @@ def summarize_run(
)
task_doc = clean_task_doc(unsorted_task_doc)

if SETTINGS.PICKLE:
with open(f"{directory}/results.pkl", "wb") as f:
Andrew-S-Rosen marked this conversation as resolved.
Show resolved Hide resolved
pickle.dump(task_doc, f)

if store:
results_to_db(store, task_doc)

Expand Down Expand Up @@ -219,6 +224,10 @@ def summarize_opt_run(
)
task_doc = clean_task_doc(unsorted_task_doc)

if SETTINGS.PICKLE:
with open(f"{directory}/results.pkl", "wb") as f:
pickle.dump(task_doc, f)

if store:
results_to_db(store, task_doc)

Expand Down Expand Up @@ -333,6 +342,10 @@ def summarize_vib_run(
)
task_doc = clean_task_doc(unsorted_task_doc)

if SETTINGS.PICKLE:
with open(f"{directory}/results.pkl", "wb") as f:
pickle.dump(task_doc, f)

if store:
results_to_db(store, task_doc)

Expand Down
3 changes: 3 additions & 0 deletions src/quacc/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ class QuaccSettings(BaseSettings):
"""
),
)
PICKLE: bool = Field(
Andrew-S-Rosen marked this conversation as resolved.
Show resolved Hide resolved
True, description="Whether the results schema should be written to a pickle file."
)
GZIP_FILES: bool = Field(
True, description="Whether generated files should be gzip'd."
)
Expand Down
Loading