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

Fix W&B run name #30462

Merged
merged 3 commits into from
May 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/transformers/integrations/integration_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,8 @@ def setup(self, args, state, model, **kwargs):
if trial_name is not None:
init_args["name"] = trial_name
init_args["group"] = args.run_name
else:
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
Copy link
Contributor

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)

Copy link
Member Author

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,
)


if self._wandb.run is None:
self._wandb.init(
Expand Down