nemo_rl#
Subpackages#
nemo_rl.evalsnemo_rl.distributednemo_rl.environmentsnemo_rl.environments.dapo_math_verifiernemo_rl.environments.metricsnemo_rl.environments.code_environmentnemo_rl.environments.math_environmentnemo_rl.environments.reward_model_environmentnemo_rl.environments.utilsnemo_rl.environments.code_jaccard_environmentnemo_rl.environments.nemo_gymnemo_rl.environments.vlm_environmentnemo_rl.environments.rewardsnemo_rl.environments.interfaces
nemo_rl.experiencenemo_rl.utilsnemo_rl.utils.packed_tensornemo_rl.utils.prefetch_venvsnemo_rl.utils.native_checkpointnemo_rl.utils.loggernemo_rl.utils.timernemo_rl.utils.flops_formulasnemo_rl.utils.flops_trackernemo_rl.utils.confignemo_rl.utils.nsysnemo_rl.utils.nvmlnemo_rl.utils.automodel_checkpointnemo_rl.utils.checkpointnemo_rl.utils.venvs
nemo_rl.datanemo_rl.algorithmsnemo_rl.models
Submodules#
Package Contents#
Functions#
Detect if we’re running in a uv build isolation environment. |
|
Check if container dependencies match the current code (container-only). |
|
Patch the nsight.py file to fix the context.py_executable assignment. |
|
Data#
API#
- nemo_rl.megatron_path#
None
- nemo_rl._is_build_isolation()[source]#
Detect if we’re running in a uv build isolation environment.
When running uv lock/sync, uv creates a temporary isolated environment in ~/.cache/uv/builds-v*/ to build packages and introspect metadata. We skip the fingerprint check in this context since the user is updating dependencies.
Returns True if in build isolation, False otherwise.
- nemo_rl._check_container_fingerprint()[source]#
Check if container dependencies match the current code (container-only).
This check only runs when NRL_CONTAINER=1 is set (inside containers). It compares the container’s fingerprint (computed at build time) with the current code’s fingerprint to detect dependency drift.
This check is also skipped entirely if NRL_FORCE_REBUILD_VENVS=true is set, since environment rebuilding will ensure dependencies are consistent regardless of a mismatch.
If there’s a mismatch, raises RuntimeError unless NRL_IGNORE_VERSION_MISMATCH is set.
- nemo_rl._patch_nsight_file()[source]#
Patch the nsight.py file to fix the context.py_executable assignment.
Until this fix is upstreamed, we will maintain this patch here. This patching logic is only applied if the user intends to use nsys profiling which they enable with NRL_NSYS_WORKER_PATTERNS.
If enabled, will effectively apply the following patch in an idempotent manner:
https://github.com/ray-project/ray/compare/master…terrykong:ray:tk/nsight-py-exeutable-fix?expand=1
This hack works b/c the nsight plugin is not called from the main driver process, so as soon as nemo_rl is imported, the patch is applied and the source of the nsight.py module is up to date before the nsight.py is actually needed.