Describe the bug
GAEConfig.average_gae defaults to True, but GAE.__init__ defaults average_gae to False (class docstring: "Default is False").
GAEConfig documents that every GAE.__init__ kwarg is exposed as a field. Hydra instantiate(GAEConfig) calls _make_gae → GAE.__init__, so leaving the field unset standardizes advantages even though constructing GAE(...) does not.
This is a default-value mismatch on an existing field, not a missing Config field. It is independent of the _CONFIG_PARITY_KNOWN_GAPS tracker in #4228 (GAEConfig is not on that allowlist; default equality is not enforced there).
GAE.for_recurrent defaults average_gae to True on purpose. That constructor is not used by instantiate(GAEConfig) and should stay as-is.
To Reproduce
from hydra.utils import instantiate
from torchrl.objectives.value import GAE
from torchrl.trainers.algorithms.configs.objectives import GAEConfig
assert GAE(gamma=0.99, lmbda=0.95, value_network=None).average_gae is False
cfg = GAEConfig(gamma=0.99, lmbda=0.95)
assert cfg.average_gae is True # Config default
assert instantiate(cfg).average_gae is True # Hydra users get GAE(average_gae=True)
Expected behavior
GAEConfig.average_gae should default to False, matching GAE.__init__. instantiate(GAEConfig(gamma=..., lmbda=...)) should produce an estimator with average_gae is False.
Additional context
average_gae: bool = False,
average_gae (bool): if ``True``, the resulting GAE values will be standardized.
Default is ``False``.
test_gae_config_instantiates_nested_group_key instantiates GAEConfig but does not assert this default.
Reason and Possible fixes
Set GAEConfig.average_gae = False so it matches GAE.__init__. Keep GAE.for_recurrent(..., average_gae=True).
Checklist
Describe the bug
GAEConfig.average_gaedefaults toTrue, butGAE.__init__defaultsaverage_gaetoFalse(class docstring: "Default isFalse").GAEConfigdocuments that everyGAE.__init__kwarg is exposed as a field. Hydrainstantiate(GAEConfig)calls_make_gae→GAE.__init__, so leaving the field unset standardizes advantages even though constructingGAE(...)does not.This is a default-value mismatch on an existing field, not a missing Config field. It is independent of the
_CONFIG_PARITY_KNOWN_GAPStracker in #4228 (GAEConfigis not on that allowlist; default equality is not enforced there).GAE.for_recurrentdefaultsaverage_gaetoTrueon purpose. That constructor is not used byinstantiate(GAEConfig)and should stay as-is.To Reproduce
Expected behavior
GAEConfig.average_gaeshould default toFalse, matchingGAE.__init__.instantiate(GAEConfig(gamma=..., lmbda=...))should produce an estimator withaverage_gae is False.Additional context
test_gae_config_instantiates_nested_group_keyinstantiatesGAEConfigbut does not assert this default.Reason and Possible fixes
Set
GAEConfig.average_gae = Falseso it matchesGAE.__init__. KeepGAE.for_recurrent(..., average_gae=True).Checklist