Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kptkin committed Aug 16, 2022
1 parent 611f4fd commit c9c6abd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wandb/sdk/wandb_watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def watch(
log_gradients = log in {"gradients", "all"}
log_parameters = log in {"parameters", "all"}

_watch(
return _watch(
models,
criterion,
log_gradients=log_gradients,
Expand All @@ -90,11 +90,14 @@ def _watch(
idx: Optional[int] = None,
log_graph: bool = False,
) -> List["wandb.wandb_torch.TorchGraph"]:
assert wandb.run is not None, "You must call `wandb.init` before calling watch"

global _global_watch_idx

graphs = []

idx = idx or _global_watch_idx

for local_idx, model in enumerate(models):
global_idx = idx + local_idx
_global_watch_idx += 1
Expand Down

0 comments on commit c9c6abd

Please sign in to comment.