Skip to navigation

nemo_gym.sandbox.providers.local

View as MarkdownOpen in Claude

Submodules

Package Contents

Classes

NameDescription
LocalProviderRuns commands on the host. No isolation: use a container provider for untrusted code.

API

class nemo_gym.sandbox.providers.local.LocalProvider(
workspace_root: str | None = None,
shell: str = '/bin/bash',
default_timeout_s: float = 180.0,
concurrency: int = 8
)

Runs commands on the host. No isolation: use a container provider for untrusted code.

_semaphore
_semaphores
dict[int, Semaphore] = {}
_workspace_root
capabilities
SandboxCapabilities = SandboxCapabilities(reconnect='never')
name
= 'local'
nemo_gym.sandbox.providers.local.LocalProvider.aclose() -> None
async
nemo_gym.sandbox.providers.local.LocalProvider.close(
) -> None
async
nemo_gym.sandbox.providers.local.LocalProvider.create(
async

A caller-supplied workdir is theirs to keep. One we allocate is ours to delete.

nemo_gym.sandbox.providers.local.LocalProvider.download_file(
source_path: str,
target_path: pathlib.Path
) -> None
async
nemo_gym.sandbox.providers.local.LocalProvider.exec(
command: str | collections.abc.Sequence[str],
cwd: str | None = None,
env: dict[str, str] | None = None,
timeout_s: int | float | None = None,
user: str | int | None = None
async

Run shell text under the configured shell, an argument list without one.

Kill the process group on timeout or cancellation. An argument list whose program cannot be started is a command failure with a shell’s exit status: 127 when the program is not found, 126 when it cannot be executed. A working directory or shell that cannot be used raises its OSError.

nemo_gym.sandbox.providers.local.LocalProvider.exec_takes_argv() -> bool

An argument list starts as the subprocess’s argv (SupportsSandboxExecArgv).

nemo_gym.sandbox.providers.local.LocalProvider.status(
async
nemo_gym.sandbox.providers.local.LocalProvider.upload_file(
source_path: pathlib.Path,
target_path: str
) -> None
async
nemo_gym.sandbox.providers.local.LocalProvider.uploads_independent_of_execs() -> bool