Skip to content

Commit

Permalink
Examples: make retrieving relative exp dir path more robust.
Browse files Browse the repository at this point in the history
  • Loading branch information
jendrikseipp committed May 14, 2021
1 parent 0501f0b commit cdfdf6f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/downward/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,17 @@ def add_evaluations_per_time(run):
return run


def _get_exp_dir_relative_to_repos_dir():
def _get_exp_dir_relative_to_repo():
repo_name = get_repo_base().name
script = Path(tools.get_script_path())
project = script.parent.name
script_dir = script.parent
rel_script_dir = script_dir.relative_to(get_repo_base())
expname = script.stem
return Path(repo_name) / "experiments" / project / "data" / expname
return repo_name / rel_script_dir / "data" / expname


def add_scp_step(exp):
remote_exp = Path(USER.remote_repos) / _get_exp_dir_relative_to_repos_dir()
remote_exp = Path(USER.remote_repos) / _get_exp_dir_relative_to_repo()
exp.add_step(
"scp-eval-dir",
subprocess.call,
Expand Down

0 comments on commit cdfdf6f

Please sign in to comment.