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

Rotate the eko back to save disk space #117

Merged
merged 6 commits into from
Sep 20, 2023
Merged
Changes from 4 commits
Commits
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
8 changes: 7 additions & 1 deletion src/pineko/theory.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,11 @@ def fk(self, name, grid_path, tcard, pdf):
if sv_method is None:
if not np.isclose(xif, 1.0):
check_scvar_evolve(grid, max_as, max_al, check.Scale.FACT)
# loading ekos
# loading ekos to produce a tmp copy
with eko.EKO.edit(eko_filename) as operators:
andreab1997 marked this conversation as resolved.
Show resolved Hide resolved
eko_tmp_path = operators.paths.root.parent / "eko-tmp"
andreab1997 marked this conversation as resolved.
Show resolved Hide resolved
operators.deepcopy(eko_tmp_path)
with eko.EKO.edit(eko_tmp_path) as operators:
# Obtain the assumptions hash
assumptions = theory_card.construct_assumptions(tcard)
# do it!
Expand Down Expand Up @@ -430,6 +433,9 @@ def fk(self, name, grid_path, tcard, pdf):
assumptions=assumptions,
comparison_pdf=pdf,
)
# Remove tmp ekos
eko_tmp_path.unlink()

logger.info(
"Finished computation of %s - took %f s",
name,
Expand Down
Loading