rlmesh.types.PredictContext
What a predict corner is told about the episode it is predicting for.
Delivered as a trailing context argument, and only to a corner whose
signature declares one – so it is additive. A model that interleaves
episodes keys everything it remembers by episode_id; state is the
slot to keep it in, so it does not need its own bookkeeping.
Attributes
- episode_idThe runtime-minted id of this episode (UUIDv7, never repeats).
- episode_seedThe seed this episode was reset with, or
Nonewhen it was not explicitly seeded. - predict_indexHow many times this episode has been predicted for already -- 0 on its first predict.
- predict_seedA reproducible per-predict seed mixed from
episode_seedandpredict_index;Nonewhen the episode carries no seed. - stateA dict that lives as long as the episode does, for whatever the model wants to carry across its predicts.
episode_id
attribute[source]episode_id: strThe runtime-minted id of this episode (UUIDv7, never repeats). "" for an anonymous lane with no identity.
episode_seed
attribute[source]episode_seed: int | NoneThe seed this episode was reset with, or None when it was not explicitly seeded.
predict_index
attribute[source]predict_index: intHow many times this episode has been predicted for already – 0 on its first predict. The re-plan ordinal, not the env step count (a chunked model re-plans once per chunk).
predict_seed
attribute[source]predict_seed: int | NoneA reproducible per-predict seed mixed from episode_seed and predict_index; None when the episode carries no seed. Seed a stochastic head with this rather than once per episode: interleaved episodes advance the same global generators, so seeding once cannot reproduce.
state
attribute[source]state: dict[str, Any]A dict that lives as long as the episode does, for whatever the model wants to carry across its predicts. Dropped when the episode ends.