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
fd217466
Commit
fd217466
authored
May 05, 2020
by
Julien Chaumond
Browse files
[Trainer] W&B: Enable model watch
See
https://github.com/huggingface/transformers/pull/3916
parent
79b1c696
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/transformers/trainer.py
src/transformers/trainer.py
+6
-2
No files found.
src/transformers/trainer.py
View file @
fd217466
...
@@ -226,10 +226,14 @@ class Trainer:
...
@@ -226,10 +226,14 @@ class Trainer:
return
optimizer
,
scheduler
return
optimizer
,
scheduler
def
_setup_wandb
(
self
):
def
_setup_wandb
(
self
):
# Start a wandb run and log config parameters
"""
Setup the optional Weights & Biases (`wandb`) integration.
One can override this method to customize the setup if needed.
"""
wandb
.
init
(
name
=
self
.
args
.
logging_dir
,
config
=
vars
(
self
.
args
))
wandb
.
init
(
name
=
self
.
args
.
logging_dir
,
config
=
vars
(
self
.
args
))
# keep track of model topology and gradients
# keep track of model topology and gradients
#
wandb.watch(self.model)
wandb
.
watch
(
self
.
model
)
def
train
(
self
,
model_path
:
Optional
[
str
]
=
None
):
def
train
(
self
,
model_path
:
Optional
[
str
]
=
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