Wrapper States¶
The state containers used by Envrax's stateful wrappers.
envrax.wrappers.frame_stack.FrameStackState
¶
Bases: EnvState, Generic[InnerStateT]
State for FrameStackObservation.
Generic over the inner env's state type so env_state is precisely
typed when the wrapper is parameterised. The base rng/step/done
fields are forwarded copies from the inner state so that the framework
(e.g. VecEnv auto-reset) can read them from the outer state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env_state
|
InnerStateT
|
Underlying environment state (may itself be a wrapped state). |
required |
obs_stack
|
Array
|
uint8[H, W, n_stack] — Ring buffer of the last |
required |
Source code in envrax/wrappers/frame_stack.py
| Python | |
|---|---|
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
envrax.wrappers.record_episode_statistics.EpisodeStatisticsState
¶
Bases: EnvState, Generic[InnerStateT]
State for RecordEpisodeStatistics.
Generic over the inner env's state type so env_state is precisely
typed when the wrapper is parameterised. The base rng/step/done
fields are forwarded copies from the inner state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env_state
|
InnerStateT
|
Inner environment state. |
required |
episode_return
|
Array
|
Cumulative reward for the current episode. float32 scalar. |
required |
episode_length
|
Array
|
Number of steps taken in the current episode. int32 scalar. |
required |
Source code in envrax/wrappers/record_episode_statistics.py
| Python | |
|---|---|
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |