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:
settings (ExperimentSettings) – The settings of the experiment.
Methods Summary
__init__
(settings, agents)_sample_and_save_rollouts
(data, iteration)Sample rollouts from the given data and save them to W&B.
Save the agent models to W&B.
log
(data, iteration)Log artifacts to W&B if it's time to do so.
Methods
- _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.
- 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.