This reference describes unreleased code on main; no release documents it yet.

rlmesh::StepEvent

structPreviewuse rlmesh::StepEvent;[source]

One env step of a run, passed to RunHooks::on_step.

struct StepEvent

episode

field[source]
episode: i64

0-based episode index (equals EpisodeResult::index).

seed

field[source]
seed: Option<i64>

The episode’s reset seed, or None.

step

field[source]
step: i64

0-based step index within the episode.

observation

field[source]
observation: Value

The observation the action was predicted from (pre-step).

action

field[source]
action: Value

The env-ready action applied to the env (never absent).

reward

field[source]
reward: f64

The step’s reward.

terminated

field[source]
terminated: bool

Whether the env reported a terminal state on this step.

truncated

field[source]
truncated: bool

Whether this step truncated the episode.

info

field[source]
info: InfoDict

The step’s info.

predict_ms

field[source]
predict_ms: f64

Wall time of the predict(s) charged to this step, in milliseconds.

step_ms

field[source]
step_ms: f64

Wall time of the env step round trip, in milliseconds.

read

field[source]
read: ReadFn

Read 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