unilab.envs.mdp.curriculums¶
Generic stage-based curriculum terms for the NumPy manager runtime.
These terms let owner YAMLs ramp any reward/termination term’s weight
and/or params by training step (env.common_step_counter) through a
declarative stage table, so tasks no longer need private step-based
curriculum terms. Stage scheduling is validated fail-closed at manager
construction time.
Classes
Stage for |
|
Stage for |
|
Update a command term's config fields and/or params based on training steps. |
|
Update an event term's params and/or config fields based on training steps. |
|
Update a reward term's weight and/or params based on training steps. |
|
Update a termination term's params and/or time_out based on training steps. |
- class unilab.envs.mdp.curriculums.CommandCurriculumStage[source]¶
Bases:
dictStage for
command_curriculum.Any key beyond
step/paramsis applied as a top-level field on the live command term config (e.g.rel_standing_envsorranges); the set of valid fields is the target term’s config schema.
- class unilab.envs.mdp.curriculums.EventCurriculumStage[source]¶
Bases:
dictStage for
event_curriculum.Any key beyond
step/paramsis applied as a top-level field on the live event term config; the set of valid fields is the target term’s config schema.
- class unilab.envs.mdp.curriculums.reward_curriculum[source]¶
Bases:
objectUpdate a reward term’s weight and/or params based on training steps.
Each stage specifies a
stepthreshold and optionally aweightand/orparamsdict. Whenenv.common_step_counterreaches a stage’sstep, the corresponding values are applied. Later stages take precedence when multiple thresholds are reached.Example owner YAML:
curriculum: action_rate_ramp: func: unilab.envs.mdp.reward_curriculum params: reward_name: action_rate stages: - {step: 0, weight: -0.1} - {step: 12000, weight: -0.4} - {step: 24000, weight: -1.0, params: {max_vel: 1.0}}
- Parameters:
cfg (
CurriculumTermCfg)env (
ManagerBasedRlEnv)
- class unilab.envs.mdp.curriculums.termination_curriculum[source]¶
Bases:
objectUpdate a termination term’s params and/or time_out based on training steps.
Each stage specifies a
stepthreshold and optionally aparamsdict and/ortime_outflag. Whenenv.common_step_counterreaches a stage’sstep, the values are applied. Later stages take precedence.Example owner YAML:
curriculum: tilt_threshold: func: unilab.envs.mdp.termination_curriculum params: termination_name: tilt stages: - {step: 12000, params: {max_tilt_deg: 80.0}} - {step: 24000, params: {max_tilt_deg: 65.0}}
- Parameters:
cfg (
CurriculumTermCfg)env (
ManagerBasedRlEnv)
- class unilab.envs.mdp.curriculums.command_curriculum[source]¶
Bases:
objectUpdate a command term’s config fields and/or params based on training steps.
Command terms read their live
self.cfgat resample time, so mutating the resolved term config (e.g.rel_standing_envsorranges) takes effect on the next command resample. Stage semantics matchreward_curriculum: every stage whosestephas been reached is applied in order, so later stages win.Example owner YAML:
curriculum: standing_envs: func: unilab.envs.mdp.command_curriculum params: command_name: twist stages: - {step: 0, rel_standing_envs: 0.02} - {step: 12000, rel_standing_envs: 0.1}
- Parameters:
cfg (
CurriculumTermCfg)env (
ManagerBasedRlEnv)
- class unilab.envs.mdp.curriculums.event_curriculum[source]¶
Bases:
objectUpdate an event term’s params and/or config fields based on training steps.
Event terms are invoked with their live
cfg.paramson every apply, so stagedparamsupdates (e.g. a widenedcom_range) take effect on the next event application. Stage semantics matchreward_curriculum.Example owner YAML:
curriculum: com_range: func: unilab.envs.mdp.event_curriculum params: event_name: base_com stages: - {step: 0, params: {com_range: {x: [-0.003, 0.003]}}} - {step: 24000, params: {com_range: {x: [-0.01, 0.01]}}}
- Parameters:
cfg (
CurriculumTermCfg)env (
ManagerBasedRlEnv)