[Trainer] W&B: Enable model watch

See https://github.com/huggingface/transformers/pull/3916
This commit is contained in:
Julien Chaumond
2020-05-05 10:59:23 -04:00
parent 79b1c6966b
commit fd2174664c

View File

@@ -226,10 +226,14 @@ class Trainer:
return optimizer, scheduler
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))
# keep track of model topology and gradients
# wandb.watch(self.model)
wandb.watch(self.model)
def train(self, model_path: Optional[str] = None):
"""