WandBLoggerBackend

class composer.loggers.wandb_logger.WandBLoggerBackend(log_artifacts: bool = False, log_artifacts_every_n_batches: int = 100, init_params: Optional[Dict[str, Any]] = None)[source]

Bases: composer.core.logging.base_backend.RankZeroLoggerBackend

Log to Weights and Biases (https://wandb.ai/)

Parameters
  • log_artifacts (bool, optional) – Whether to log artifacts (default: False)

  • log_artifacts_every_n_batches (int, optional) – Interval at which to upload artifcats to wandb from the run_directory. On resnet50, a 22% regression was realized when logging and uploading artifacts, so it is recommended to do so infrequently. Only applicable when log_artifacts is True (default: 100)

  • init_params (Dict[str, Any], optional) – Parameters to pass into wandb.init().

batch_end(state: State, logger: Logger) None[source]

Called on the BATCH_END event.

Parameters
  • state (State) – The global state.

  • logger (Logger) – The logger.

epoch_end(state: State, logger: Logger) None[source]

Called on the EPOCH_END event.

Parameters
  • state (State) – The global state.

  • logger (Logger) – The logger.

state_dict() composer.core.types.StateDict[source]

Returns a dictionary representing the internal state.

The returned dictionary must be pickale-able via torch.save().

Returns

StateDict – The state of the object