nemo_gym.artifacts.exporters.isolated
nemo_gym.artifacts.exporters.isolated
Module Contents
Classes
Functions
Data
API
Bases: RuntimeError
The run cannot be handed to an isolated exporter’s worker; the message says why.
Bases: RuntimeError
The virtual environment an isolated exporter needs could not be built.
Bases: Exporter
An exporter whose backend work runs in its own virtual environment.
The SDK and its dependencies never enter Gym’s environment, and an SDK that updates itself cannot disturb
it. The main process validates the config and prepares what the backend needs (build_payload); the worker,
a standalone file run with the environment’s Python, does the backend call.
The payload goes to the worker as JSON on stdin and may carry credentials, which therefore stay out of the
process list. The worker file defines run(payload) -> dict and must not import nemo_gym.
The JSON-serializable input for the worker. Files it stages go under workdir, removed afterwards.
Raise ExportPreparationError when the run cannot be exported.
Seconds the worker may run before it is killed and the export fails; None for no limit.
A backend SDK can hang (a stalled upload, a retry loop), and an export that runs in a job script would hold the job’s allocation until then.
This process’s environment minus what would point the worker’s Python back at Gym’s packages.
The exporter environment’s bin leads PATH, so a bare python or an SDK-installed command resolves there.
Build the exporter’s virtual environment if it is not ready, and return its Python.
Concurrent exports share one build: setup_environment serializes installers with a file lock and skips a
ready environment.
<venv_root>/exporters/<name>/<digest of requirements>/.venv.
Keying on the requirements gives a changed requirement list a fresh environment, while a given list keeps its environment, which an SDK is free to update itself within.