pub fn export<E: Environment>(
env: &E,
path: impl AsRef<Path>,
) -> Result<(), ExportError>Expand description
Writes an environment as a .ruxlapkg package (a directory) for the
Python package ruxla, which loads it with ruxla.load_env.
The package holds reset, step (with automatic reset; it returns
(obs, state, reward, terminated, truncated, final_observation, discount)), and default_params, traced for single episodes with
B = Trace from examples made natively (the default parameters and a
reset state). JAX’s vmap batches them through ruxla’s vmap.
§Errors
Returns an error if the files cannot be written.