".circleci/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "7580485904d32c9c7d88f6457759c990318d796b"
Unverified Commit bb154ac5 authored by Saurabh Misra's avatar Saurabh Misra Committed by GitHub
Browse files

Fixing TPU training by disabling wandb.watch gradients logging for TPU (#4926)

parent fb6cccb8
......@@ -335,8 +335,8 @@ class Trainer:
'Automatic Weights & Biases logging enabled, to disable set os.environ["WANDB_DISABLED"] = "true"'
)
wandb.init(project=os.getenv("WANDB_PROJECT", "huggingface"), config=vars(self.args))
# keep track of model topology and gradients
if os.getenv("WANDB_WATCH") != "false":
# keep track of model topology and gradients, unsupported on TPU
if not is_torch_tpu_available() and os.getenv("WANDB_WATCH") != "false":
wandb.watch(
self.model, log=os.getenv("WANDB_WATCH", "gradients"), log_freq=max(100, self.args.logging_steps)
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment