nemo_gym.orchestration.executors.connection
nemo_gym.orchestration.executors.connection
Module Contents
Classes
Functions
Data
API
Bases: Connection
Single SSH master connection; copy and all commands reuse the same socket.
The environment variables above bound a connection that hangs: a login host that never answers the connect, a link that goes quiet, or a command that never finishes, the remote reader included. A command that runs out of its time raises RuntimeError.
Like _checked, but stdin stays open until the command exits, so its EOF on the far end means that this
process or its connection is gone. The commands must end the remote shell themselves (exit).
Progress lines on the command’s stderr (READER_PROGRESS_PREFIX) reach this process’s stderr while it runs;
stdout is returned whole, as before. A command still running after timeout_s seconds is killed, which closes its
stdin and ends the remote shell as any other interruption does, and raises RuntimeError; None sets no limit.
Keep all of stderr for the error message, and pass each progress line on as it arrives.
Reap a stopped command and close its pipes once the threads using them are done, without delaying the caller.
Closing a pipe while a thread still reads or writes it would block on that thread, which is the overrun the deadline exists to prevent, so the close waits for each thread (they end because the command was killed).
subprocess.run(capture_output=True, text=True, timeout=timeout_s), but an expiry kills the command’s whole
process group, so what it started (an ssh ProxyCommand, an rsync helper) does not outlive the error.