Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
122b2657
Unverified
Commit
122b2657
authored
Oct 04, 2023
by
Bharat Ramanathan
Committed by
GitHub
Oct 04, 2023
Browse files
feat: add trainer label to wandb run upon initialization (#26466)
parent
4fdf47cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/transformers/integrations/integration_utils.py
src/transformers/integrations/integration_utils.py
+1
-0
No files found.
src/transformers/integrations/integration_utils.py
View file @
122b2657
...
...
@@ -753,6 +753,7 @@ class WandbCallback(TrainerCallback):
_watch_model
=
os
.
getenv
(
"WANDB_WATCH"
,
"false"
)
if
not
is_torch_tpu_available
()
and
_watch_model
in
(
"all"
,
"parameters"
,
"gradients"
):
self
.
_wandb
.
watch
(
model
,
log
=
_watch_model
,
log_freq
=
max
(
100
,
state
.
logging_steps
))
self
.
_wandb
.
run
.
_label
(
code
=
"transformers_trainer"
)
def
on_train_begin
(
self
,
args
,
state
,
control
,
model
=
None
,
**
kwargs
):
if
self
.
_wandb
is
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment