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

Scheduler passes results path to experiment file #24

Merged
merged 4 commits into from
Nov 1, 2024
Merged

Conversation

yasuiniko
Copy link
Collaborator

Fixes #23

@@ -41,6 +41,7 @@ def __init__(self, exp_name: str, seeds: list[int], entry: str, version: Version
self.seeds = seeds
self.entry = entry
self.base_path = base or os.getcwd()
self.results_path = os.path.join(self.base_path, 'results', self.exp_name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recently learned of from pathlib import Path which is part of the standard library: https://docs.python.org/3/library/pathlib.html

Let's you do some of this path manipulation stuff like this:

self.results_path = Path(self.base_path) / 'results' / self.exp_name

which is pretty nice. Generally just simplifies filesystem related things a lot.


Anyways, no action item here (i.e. really no need to change this code), just thought I'd share!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool!! I am always confused about which Path objects you can use as strings and which you cannot (PosixPath?). Thanks for the review!

@yasuiniko yasuiniko merged commit f84ae8d into main Nov 1, 2024
5 checks passed
@yasuiniko yasuiniko deleted the scheduler-path branch November 1, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UX: scheduler doesn't tell users where to save results
2 participants