unilab.utils.reward.extract_reward_config

unilab.utils.reward.extract_reward_config(cfg, *, target_field='reward_config')[source]

Extract and validate reward config from Hydra config.

Parameters:
  • cfg (DictConfig) – Hydra DictConfig containing reward section

  • target_field (str)

Return type:

dict[str, dict[str, Any]]

Returns:

Dictionary with target_field as the env config override key.

Raises:

ValueError – If reward config is missing