-
Notifications
You must be signed in to change notification settings - Fork 24
Separate the output_dir and sub_output_dir to make reproducing results easier #306
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
Conversation
✅ Deploy Preview for code-generator ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@guptaaryan16 I'm not very fan of introducing this param which is very close to output_dir. |
@vfdev-5 The thing is we need to separate the |
Can we do simply do the following instead of introducing another param ? output_dir = setup_output_dir(config, rank)
if rank == 0:
save_config(config, output_dir)
config.output_dir = output_dir |
The function definition of
If we want to do this we have to change this function as
Does this seem right to you |
OK, let's update it to: def setup_output_dir(config: Any, rank: int) -> Path:
output_dir = config.output_dir
if rank == 0:
now = datetime.now().strftime("%Y%m%d-%H%M%S")
name = f"{now}-backend-{config.backend}-lr-{config.lr}"
path = Path(config.output_dir, name)
path.mkdir(parents=True, exist_ok=True)
output_dir = path.as_posix()
return Path(idist.broadcast(output_dir, src=0)) |
Description
This PR introduces a distinction between
output_dir
andsub_output_dir
in the templates. This simplifies the end result for the user to access thelogs/<job-dir>
and integration of other reproducibility based features for templates in future.Fix #292
Additional context
What is the purpose of this pull request?