Skip to content

Commit

Permalink
Add add_compress_exp_dir_step() function in project.py example module.
Browse files Browse the repository at this point in the history
  • Loading branch information
jendrikseipp committed Nov 25, 2024
1 parent 3254f2f commit def821b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions examples/downward/2020-09-11-A-cg-vs-ff.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,6 @@
name=f"{exp.name}-{algo1}-vs-{algo2}-{attr}{suffix}",
)

project.add_compress_exp_dir_step(exp)

exp.run_steps()
1 change: 1 addition & 0 deletions examples/downward/2020-09-11-B-bounded-cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,6 @@
attributes=ATTRIBUTES,
filter=[project.add_evaluations_per_time, project.group_domains],
)
project.add_compress_exp_dir_step(exp)

exp.run_steps()
19 changes: 19 additions & 0 deletions examples/downward/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,25 @@ def add_scp_step(exp, login, repos_dir):
)


def add_compress_exp_dir_step(exp):
exp.add_step(
"compress-exp-dir",
subprocess.call,
[
"tar",
"--verbose",
"--create",
"--dereference",
"--remove-files",
"--xz",
"--file",
f"{exp.name}.tar.xz",
exp.name,
],
cwd=Path(exp.path).parent,
)


def fetch_algorithm(exp, expname, algo, *, new_algo=None):
"""Fetch (and possibly rename) a single algorithm from *expname*."""
new_algo = new_algo or algo
Expand Down
4 changes: 2 additions & 2 deletions tests/run-downward-experiment
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ rm -rf ${EXPDIR}/data/
mkdir -p ${EXPDIR}
cp ${REPO}/examples/downward/*.py ${EXPDIR}
cp ${REPO}/examples/downward/bounds.json ${EXPDIR}
${DIR}/run-example-experiment ${EXPDIR}/2020-09-11-A-cg-vs-ff.py 1 2 3 4 6 8
${DIR}/run-example-experiment ${EXPDIR}/2020-09-11-B-bounded-cost.py 1 2 3 4 6
${DIR}/run-example-experiment ${EXPDIR}/2020-09-11-A-cg-vs-ff.py 1 2 3 4 6 8 9
${DIR}/run-example-experiment ${EXPDIR}/2020-09-11-B-bounded-cost.py 1 2 3 4 6 8
${DIR}/run-example-experiment ${EXPDIR}/01-evaluation.py 1 2 3 4

0 comments on commit def821b

Please sign in to comment.