nemo_gym.agent_utils.process_supervisor
nemo_gym.agent_utils.process_supervisor
Standalone Linux process supervisor to upload beside a sandboxed harness.
Uses only the standard library; Gym need not be installed in the task sandbox. The receipt confirms descendant cleanup independently of the harness result.
Module Contents
Classes
Functions
Data
API
Bases: typing.TypedDict
Outcome written only after supervision and bounded cleanup finish.
Reap tool descendants, including processes that detached with setsid().
Enforce a harness deadline, then acknowledge cleanup after all descendants exit.
Reserve TERM grace, harness process reaping, and descendant draining.
The extra 30 seconds cover startup, polling, and receipt I/O beyond those bounded cleanup phases. Keep their count shared with the controller budget.
Run COMMAND and atomically write its cleanup receipt outside the task workdir.