unilab.visualization.playback

Playback rendering compatibility entrypoint.

Functions

camera_cfg_from_training(training_cfg)

Assemble the typed playback camera config from a training owner config.

render_play_mode(env, *, sim_backend, ...[, ...])

Run playback through the env/backend playback contract.

unilab.visualization.playback.camera_cfg_from_training(training_cfg)[source]

Assemble the typed playback camera config from a training owner config.

Hydra training.cam_* fields keep their names; this helper is the single normalization point so unknown keys fail closed at the unisim boundary instead of being silently ignored.

Parameters:

training_cfg (Any)

Return type:

CameraCfg

unilab.visualization.playback.render_play_mode(env, *, sim_backend, initialize, step, num_steps, output_video=None, render_spacing=None, render_offset_mode=None, headless=None, record_video=None, frame_state_getter=None, camera_kwargs=None, debug_overlay_getter=None, on_frame=None)[source]

Run playback through the env/backend playback contract.

sim_backend is retained for older call sites; backend selection now belongs to env.run_playback() and concrete backend implementations.

Parameters:
  • sim_backend (str)

  • initialize (Callable[[], ObsT])

  • step (Callable[[ObsT], ObsT])

  • num_steps (int | None)

  • output_video (str | Path | None)

  • render_spacing (float | None)

  • render_offset_mode (str | None)

  • headless (bool | None)

  • record_video (bool | None)

  • frame_state_getter (Callable[[], np.ndarray] | None)

  • camera_kwargs (CameraCfg | dict[str, Any] | None)

  • debug_overlay_getter (DebugOverlayGetter | None)

  • on_frame (Callable[[int, np.ndarray], np.ndarray | None] | None)

Return type:

str | None