nip.artifact_logger.ArtifactLogger#

class nip.artifact_logger.ArtifactLogger(settings: ExperimentSettings, agents: dict[str, Agent])[source]#

Samples rollouts from an environment and saves them to W&B.

Parameters:

Methods Summary

__init__(settings, agents)

_sample_and_save_rollouts(data, iteration)

Sample rollouts from the given data and save them to W&B.

_save_checkpoint()

Save the agent models to W&B.

log(data, iteration)

Log artifacts to W&B if it's time to do so.

Methods

__init__(settings: ExperimentSettings, agents: dict[str, Agent])[source]#
_sample_and_save_rollouts(data: TensorDict, iteration: int)[source]#

Sample rollouts from the given data and save them to W&B.

Parameters:
  • data (TensorDict) – The data to sample rollouts from.

  • iteration (int) – The iteration of training we are on.

_save_checkpoint()[source]#

Save the agent models to W&B.

log(data: TensorDict, iteration: int)[source]#

Log artifacts to W&B if it’s time to do so.

Parameters:
  • data (TensorDict) – The data sampled most recently from the data collector.

  • iteration (int) – The iteration of training we are on.