rlmesh::StepEvent
One env step of a run, passed to RunHooks::on_step.
struct StepEventFields
- episode0-based episode index (equals
EpisodeResult::index). - seedThe episode's reset seed, or
None. - step0-based step index within the episode.
- observationThe observation the action was predicted from (pre-step).
- actionThe env-ready action applied to the env (never absent).
- rewardThe step's reward.
- terminatedWhether the env reported a terminal state on this step.
- truncatedWhether this step truncated the episode.
- infoThe step's info.
- predict_msWall time of the predict(s) charged to this step, in milliseconds.
- step_msWall time of the env step round trip, in milliseconds.
- readRead one role or input leaf from this event’s observation.
Methods
episode
field[source]episode: i640-based episode index (equals EpisodeResult::index).
seed
field[source]seed: Option<i64>The episode’s reset seed, or None.
step
field[source]step: i640-based step index within the episode.
observation
field[source]observation: ValueThe observation the action was predicted from (pre-step).
action
field[source]action: ValueThe env-ready action applied to the env (never absent).
reward
field[source]reward: f64The step’s reward.
terminated
field[source]terminated: boolWhether the env reported a terminal state on this step.
truncated
field[source]truncated: boolWhether this step truncated the episode.
info
field[source]info: InfoDictThe step’s info.
predict_ms
field[source]predict_ms: f64Wall time of the predict(s) charged to this step, in milliseconds.
step_ms
field[source]step_ms: f64Wall time of the env step round trip, in milliseconds.
read
field[source]read: ReadFnRead one role or input leaf from this event’s observation.
read
method[source]fn read(&self, item: impl Into<ReadItem>) -> Result<Value>Read one semantic role or leaf through this event’s bound callback.
Trait implementations
- impl Clone for StepEvent
- impl Debug for StepEvent
- impl Display for StepEvent
- impl PartialEq for StepEvent