Problem
The function compute_advantages_and_returns in ppo_utils.py uses adv_estimator as its Python parameter name (line 1348), while the config field on AlgorithmConfig is named advantage_estimator (config.py line 366).
The trainer correctly reads self.cfg.trainer.algorithm.advantage_estimator and passes it as adv_estimator=... to the function — so the internal plumbing is correct. The problem is that the two different names create a footgun for anyone writing a new integration, entrypoint, or launch script.
Reproduction
If a developer writes trainer.algorithm.adv_estimator=gtpo on the CLI (copying the function parameter name as the natural config key), validate_dict_keys_against_dataclass raises at startup:
ValueError: Invalid fields {'adv_estimator'} for AlgorithmConfig.
Valid fields are {'advantage_estimator', ...}
The run crashes immediately with no indication that advantage_estimator is the correct CLI key. The error message does list valid fields, but the root cause — that the function param and config field use different names — is non-obvious and easy to hit when writing new integrations.
Suggested fix
Rename the parameter in compute_advantages_and_returns from adv_estimator to advantage_estimator so both names are consistent. This is a one-line internal change with no behavior impact. All callers in trainer.py already pass the value via keyword argument, so they would need a matching rename.
Affected files
skyrl/backends/skyrl_train/utils/ppo_utils.py — function parameter name at line 1348
skyrl/train/config/config.py — config field advantage_estimator at line 366
skyrl/train/trainer.py — callers at lines 988, 1004, 1026 (keyword arg adv_estimator=)
Problem
The function
compute_advantages_and_returnsinppo_utils.pyusesadv_estimatoras its Python parameter name (line 1348), while the config field onAlgorithmConfigis namedadvantage_estimator(config.py line 366).The trainer correctly reads
self.cfg.trainer.algorithm.advantage_estimatorand passes it asadv_estimator=...to the function — so the internal plumbing is correct. The problem is that the two different names create a footgun for anyone writing a new integration, entrypoint, or launch script.Reproduction
If a developer writes
trainer.algorithm.adv_estimator=gtpoon the CLI (copying the function parameter name as the natural config key),validate_dict_keys_against_dataclassraises at startup:The run crashes immediately with no indication that
advantage_estimatoris the correct CLI key. The error message does list valid fields, but the root cause — that the function param and config field use different names — is non-obvious and easy to hit when writing new integrations.Suggested fix
Rename the parameter in
compute_advantages_and_returnsfromadv_estimatortoadvantage_estimatorso both names are consistent. This is a one-line internal change with no behavior impact. All callers intrainer.pyalready pass the value via keyword argument, so they would need a matching rename.Affected files
skyrl/backends/skyrl_train/utils/ppo_utils.py— function parameter name at line 1348skyrl/train/config/config.py— config fieldadvantage_estimatorat line 366skyrl/train/trainer.py— callers at lines 988, 1004, 1026 (keyword argadv_estimator=)