-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Correct an apparent logger output directory bug #1232
base: main
Are you sure you want to change the base?
Conversation
Thanks for the contribution. I don't have a strong opinion on the hardcoding of |
Co-authored-by: Sebastian Raschka <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving in case there is a strong desire for this change, but personally I vote against it (see comment below). Note that unless we expose every little configuration option in every logger it will always be opinionated and "hardcoded". But I think in the current state of LitGPT, that's also ok.
@@ -451,9 +451,9 @@ def choose_logger( | |||
**kwargs: Any, | |||
): | |||
if logger_name == "csv": | |||
return CSVLogger(root_dir=(out_dir / "logs"), name="csv", flush_logs_every_n_steps=log_interval, **kwargs) | |||
return CSVLogger(root_dir=(out_dir / "logs"), name=name, flush_logs_every_n_steps=log_interval, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to point out that "name" that is passed in is not conceptually the same as "name" argument of the logger, it's used differently to make a simplified directory structure. And so the choice here was deliberate (by me). With the change in this PR, there will now be essentially twice the name in the directory structure, which is what I wanted to avoid.
The
name
arg is hardcoded in the main branch. This pr tries to correct it by using the value parsed by thename
argument.