hybrid_aif.reference.raif.columns#
R-AIF’s episode columns, as task columns of the engine’s Episode.
is_success is the goal predicate on the row’s observation, has_succeeded its running
OR, can_self_imitate the expert flag that revise overwrites with the imitation
mask, and pref_label is ρ. In Mountain Car the goal ends the episode, so
raif_episode() writes cont = 1 − is_success.
Design: docs/design/amortization-p0-addendum.md §4.
Module Attributes
The task columns and how a buffer pads them: the two flags hold their last value (a padded step is still "after the goal"), the weight and the label are zero where nothing was done or earned. |
|
The recorded columns — the on-disk fixture format and the collect stream's arrays; |
Functions
|
An |
|
An |
|
The recorded columns of |
|
Whether the episode reached the goal: its final |
Classes
|
Array base class for JAX |
|
One task-specific column of an |
|
One episode's per-step columns — the format the whole training side speaks. |
- hybrid_aif.reference.raif.columns.EXTRAS: dict[str, ColumnSpec] = {'can_self_imitate': ((), 'float32', 'zero'), 'has_succeeded': ((), 'bool', 'hold'), 'is_success': ((), 'bool', 'hold'), 'pref_label': ((), 'float32', 'zero')}#
The task columns and how a buffer pads them: the two flags hold their last value (a padded step is still “after the goal”), the weight and the label are zero where nothing was done or earned.
- hybrid_aif.reference.raif.columns.RECORDED: tuple[str, ...] = ('obs', 'action', 'reward', 'is_success', 'has_succeeded', 'can_self_imitate', 'is_first', 'is_last')#
The recorded columns — the on-disk fixture format and the collect stream’s arrays;
pref_labelis derived and never stored.
- hybrid_aif.reference.raif.columns.raif_episode(
- *,
- obs,
- action,
- reward,
- is_success,
- has_succeeded,
- can_self_imitate,
- is_first,
- is_last,
- pref_label=None,
An
Episodefrom their recorded columns:cont = 1 − is_success, the four task columns inextras(ρ zero untilrevise.label()).