unilab.training.tensor_runtime_hooks

Pickleable runtime hooks injected across the unilab.rl spawn boundary.

unilab.rl owns collector orchestration and does not import the training layer. The off-policy runner passes these module-level constructors to the collector so environment-owned diagnostics stay in their owner package.

Functions

tensor_nan_guard_factory(cfg, num_envs, ...)

Construct UniLab's device-resident tensor finite-state guard.

unilab.training.tensor_runtime_hooks.tensor_nan_guard_factory(cfg, num_envs, supports_state_playback)[source]

Construct UniLab’s device-resident tensor finite-state guard.

Parameters:
  • cfg (Any)

  • num_envs (int)

  • supports_state_playback (bool)

Return type:

Any