# {py:mod}`evorl.algorithms.ec.obs_utils` ```{py:module} evorl.algorithms.ec.obs_utils ``` ```{autodoc2-docstring} evorl.algorithms.ec.obs_utils :parser: autodoc2_docstrings_parser :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`ObsPreprocessor ` - ```` ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`init_obs_preprocessor ` - ```{autodoc2-docstring} evorl.algorithms.ec.obs_utils.init_obs_preprocessor :parser: autodoc2_docstrings_parser :summary: ``` * - {py:obj}`init_obs_preprocessor_with_random_timesteps ` - ```{autodoc2-docstring} evorl.algorithms.ec.obs_utils.init_obs_preprocessor_with_random_timesteps :parser: autodoc2_docstrings_parser :summary: ``` * - {py:obj}`rollout_obs ` - ```{autodoc2-docstring} evorl.algorithms.ec.obs_utils.rollout_obs :parser: autodoc2_docstrings_parser :summary: ``` ```` ### API `````{py:class} ObsPreprocessor :canonical: evorl.algorithms.ec.obs_utils.ObsPreprocessor Bases: {py:obj}`evorl.types.PyTreeNode` ````{py:attribute} random_timesteps :canonical: evorl.algorithms.ec.obs_utils.ObsPreprocessor.random_timesteps :type: int :value: > 0 ```{autodoc2-docstring} evorl.algorithms.ec.obs_utils.ObsPreprocessor.random_timesteps :parser: autodoc2_docstrings_parser ``` ```` ````{py:attribute} static :canonical: evorl.algorithms.ec.obs_utils.ObsPreprocessor.static :type: bool :value: > False ```{autodoc2-docstring} evorl.algorithms.ec.obs_utils.ObsPreprocessor.static :parser: autodoc2_docstrings_parser ``` ```` ````` ````{py:function} init_obs_preprocessor(agent_state, config, key, dp_axis_name=None) :canonical: evorl.algorithms.ec.obs_utils.init_obs_preprocessor ```{autodoc2-docstring} evorl.algorithms.ec.obs_utils.init_obs_preprocessor :parser: autodoc2_docstrings_parser ``` ```` ````{py:function} init_obs_preprocessor_with_random_timesteps(obs_preprocessor_state: typing.Any, timesteps: int, env: evorl.envs.Env, key: chex.PRNGKey, dp_axis_name: str | None = None) -> typing.Any :canonical: evorl.algorithms.ec.obs_utils.init_obs_preprocessor_with_random_timesteps ```{autodoc2-docstring} evorl.algorithms.ec.obs_utils.init_obs_preprocessor_with_random_timesteps :parser: autodoc2_docstrings_parser ``` ```` ````{py:function} rollout_obs(env_fn: evorl.envs.EnvStepFn, action_fn: evorl.agent.AgentActionFn, env_state: evorl.envs.EnvState, agent_state: evorl.agent.AgentState, key: chex.PRNGKey, rollout_length: int) -> tuple[chex.ArrayTree, evorl.envs.EnvState] :canonical: evorl.algorithms.ec.obs_utils.rollout_obs ```{autodoc2-docstring} evorl.algorithms.ec.obs_utils.rollout_obs :parser: autodoc2_docstrings_parser ``` ````