nemo_gym.sandbox.utils

View as Markdown

Sandbox utility helpers.

Module Contents

Functions

NameDescription
cpu_cap_envCPU_CAP_ENV_VARS derived from a sandbox CPU limit; empty when unset.
rewrite_imageApply ordered image-prefix rewrites used by sandbox configs.

Data

CPU_CAP_ENV_VARS

API

nemo_gym.sandbox.utils.cpu_cap_env(
cpu: float | int | None
) -> dict[str, str]

CPU_CAP_ENV_VARS derived from a sandbox CPU limit; empty when unset.

nemo_gym.sandbox.utils.rewrite_image(
image: str | None,
rewrites: list[dict[str, str]]
) -> str | None

Apply ordered image-prefix rewrites used by sandbox configs.

nemo_gym.sandbox.utils.CPU_CAP_ENV_VARS: tuple[str, ...] = ('OMP_NUM_THREADS', 'OMP_THREAD_LIMIT', 'OPENBLAS_NUM_THREADS', 'MKL_NUM_THREADS...