torchrl.trainers.algorithms.configs.hooks.LogScalarConfig¶
- class torchrl.trainers.algorithms.configs.hooks.LogScalarConfig(key: Any = ('next', 'reward'), logname: str | None = None, log_pbar: bool = False, include_std: bool = True, reduction: str = 'mean', _target_: str = 'torchrl.trainers.trainers.LogScalar')[source]¶
Configuration for the
LogScalarhook.Examples
>>> from torchrl.trainers.algorithms.configs.hooks import LogScalarConfig >>> from hydra.utils import instantiate >>> hook = instantiate( ... LogScalarConfig(key=["next", "reward"], logname="train_reward") ... )