Skip to content

Commit

Permalink
Assign each experiment unique id (#76)
Browse files Browse the repository at this point in the history
* Assign each experiment unique id

* Make a bit more readable

[skip ci]

Co-authored-by: Charles Tapley Hoyt <cthoyt@gmail.com>
  • Loading branch information
mali-git and cthoyt committed Aug 21, 2020
1 parent 0d916fe commit 630d872
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pykeen/experiments/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,13 @@ def _help_reproduce(
click.echo(f'Running configuration at {path}')

# Create directory in which all experimental artifacts are saved
datetime = time.strftime('%Y-%m-%d-%H-%M-%S')
if file_name is not None:
output_directory = os.path.join(directory, time.strftime(f"%Y-%m-%d-%H-%M-%S_{file_name}"))
experiment_id = f'{datetime}_{uuid4()}_{file_name}'
else:
output_directory = os.path.join(directory, time.strftime("%Y-%m-%d-%H-%M-%S"))
experiment_id = f'{datetime}_{uuid4()}'
output_directory = os.path.join(directory, experiment_id)

os.makedirs(output_directory, exist_ok=True)

replicate_pipeline_from_path(
Expand Down

0 comments on commit 630d872

Please sign in to comment.