unilab.training.tensor_diagnostics¶
Finite-state diagnostics for the tensor-native environment runtime.
The guard’s detection path stays in Torch: it never converts observations,
rewards, controls, or physics snapshots to host arrays. Host conversion and
artifact writing happen only in NanGuard.dump(), which is an
explicit abnormal-diagnostic boundary.
Classes
Detect bad tensor rows on-device and export dumps at an explicit host boundary. |
|
Pickleable configuration for the tensor finite-state guard. |
- class unilab.training.tensor_diagnostics.NanGuardCfg[source]¶
Bases:
objectPickleable configuration for the tensor finite-state guard.
- class unilab.training.tensor_diagnostics.NanGuard[source]¶
Bases:
objectDetect bad tensor rows on-device and export dumps at an explicit host boundary.
- Parameters:
cfg (
NanGuardCfg)num_envs (
int)supports_state_playback (
bool)
- __init__(cfg, num_envs, supports_state_playback)[source]¶
- Parameters:
cfg (
NanGuardCfg)num_envs (
int)supports_state_playback (
bool)
- check(obs, reward, step=0)[source]¶
Return device-resident bad-row indices, or
Nonewhen every row is finite.