Skip to content

Commit

Permalink
add experiment name to log file
Browse files Browse the repository at this point in the history
  • Loading branch information
rchan26 committed May 7, 2024
1 parent 297c0bb commit 396a42f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/prompto/experiment_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(
).strftime("%d-%m-%Y-%H-%M-%S")
# log file is a file in the experiment output folder
self.log_file: str = os.path.join(
self.output_folder, f"{self.creation_time}-log.txt"
self.output_folder, f"{self.creation_time}-{self.experiment_name}-log.txt"
)
# file path of the completed experiment file in the output experiment folder
self.output_completed_file_path: str = os.path.join(
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_experiment_init(temporary_data_folders):
assert isinstance(experiment.creation_time, str)
assert (
experiment.log_file
== f"data/output/test_in_input/{experiment.creation_time}-log.txt"
== f"data/output/test_in_input/{experiment.creation_time}-test_in_input-log.txt"
)

# test str method
Expand Down

0 comments on commit 396a42f

Please sign in to comment.