-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
Fix W&B run name #30462
Fix W&B run name #30462
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
Thanks for this update!
I agree, if I specified run_name
I'd expect it to be respected.
cc @muellerzr to confirm it's OK for you
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.
How would we feel about as a last option doing output_dir
as the run_name
, in the unlikely case a user never decides to set it?
Otherwise I'd rather we raise a ValueError
and tell the user they must pass in a run_name
(potentially breaking)
I like the idea of doing @parambharat we would much appreciate your thoughts about this change, please let us know if we are missing any of your use cases as you were one of the contributors for this callback 🤗 |
806dbf7
to
4337701
Compare
cc @parambharat (right @) |
@qubvel : This check was quite deliberate. The That's why the condition here checks if the user deliberately set the |
@parambharat thanks a lot for the clarification, I didn't notice that There might be the following cases with the current code:
I suppose we can resolve inconsistency in 1st and 2nd with one of the following ways:
@muellerzr @parambharat @amyeroberts what do you think? |
I like option 2. Option 1 I think is better overall (arguments' behaviour is more consistent), but we want to avoid an unexpected change in behaviour in MLFlowCallback. |
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.
Thanks!
if not (args.run_name is None or args.run_name == args.output_dir): | ||
init_args["name"] = args.run_name | ||
elif args.run_name is not None: | ||
init_args["name"] = args.run_name |
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.
Hi @qubvel : One suggestion. Since this is changing the expectation for some W&B users can we add the following warning?
self._wandb.termwarn("Please set `TrainingArguments.run_name` to specify the W&B run name. If unset, `TrainingArguments.output_dir` will be used by default.", repeat=False)
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.
Ok, added with a bit different wording:
self._wandb.termwarn(
"The `run_name` is currently set to the same value as `TrainingArguments.output_dir`. If this was "
"not intended, please specify a different run name by setting the `TrainingArguments.run_name` parameter.",
repeat=False,
)
I loved my random run names =( |
same, now they're lame |
What does this PR do?
Currently, the
TrainingArguments.run_name
argument is silently ignored for W&B if it is the same asTrainingArguments.output_dir
.transformers/src/transformers/integrations/integration_utils.py
Line 766 in d1d94d7
This behavior was introduced in this PR to avoid runs with the same name in W&B. However,
output_dir
In my opinion, runs with the same name are normal behavior, they still can be differentiated by hyperparameters and timestamps in UI better than just random names. They also can be renamed manually in UI.
This PR proposes to remove the comparison
run_name
andoutput_dir
, and always set the run name specified by the user.Please, let me know what you think.
Env params:
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.