mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-04 05:10:06 +06:00
feat: add trainer label to wandb run upon initialization (#26466)
This commit is contained in:
parent
4fdf47cd3c
commit
122b2657f8
@ -753,6 +753,7 @@ class WandbCallback(TrainerCallback):
|
|||||||
_watch_model = os.getenv("WANDB_WATCH", "false")
|
_watch_model = os.getenv("WANDB_WATCH", "false")
|
||||||
if not is_torch_tpu_available() and _watch_model in ("all", "parameters", "gradients"):
|
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.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):
|
def on_train_begin(self, args, state, control, model=None, **kwargs):
|
||||||
if self._wandb is None:
|
if self._wandb is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user