Skip to content

Commit

Permalink
Added check for wandb before logging to wandb
Browse files Browse the repository at this point in the history
  • Loading branch information
AMHermansen committed Sep 11, 2023
1 parent e5e49cd commit 761150f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/04_training/03_train_classification_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def main(
# Log configurations to W&B
# NB: Only log to W&B on the rank-zero process in case of multi-GPU
# training.
if rank_zero_only == 0:
if wandb and rank_zero_only == 0:
wandb_logger.experiment.config.update(config)
wandb_logger.experiment.config.update(model_config.as_dict())
wandb_logger.experiment.config.update(dataset_config.as_dict())
Expand Down

0 comments on commit 761150f

Please sign in to comment.