Skip to content

Commit d286e87

Browse files
author
intern_nem_dev_3
committed
Make Stage2 RL cache comments portable
1 parent 0b31358 commit d286e87

10 files changed

Lines changed: 92 additions & 9 deletions

File tree

src/nemotron/recipes/super3/stage2_rl/config/default.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ run:
77
container: "" # Set to nemo-skills-sandbox image path/URI
88
port: 6000
99
command: "/start-with-nginx.sh"
10-
persistent_cache: "" # Set to shared cache dir (e.g. /lustre/.../cache)
10+
persistent_cache: "" # Set to shared cache dir (e.g. ${NEMO_RUN_DIR:-.}/cache/super3/stage2_rl)
1111
env_vars:
1212
NRL_WG_USE_RAY_REF: "1"
1313
NRL_VLLM_USE_V1: "1"

src/nemotron/recipes/super3/stage2_rl/stage1_rlvr/config/default.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ run:
77
container: "" # Set to nemo-skills-sandbox image path/URI
88
port: 6000
99
command: "/start-with-nginx.sh"
10-
persistent_cache: "" # Set to shared cache dir (e.g. /lustre/.../cache)
10+
persistent_cache: "" # Set to shared cache dir (e.g. ${NEMO_RUN_DIR:-.}/cache/super3/stage2_rl)
1111
env_vars:
1212
NRL_WG_USE_RAY_REF: "1"
1313
NRL_VLLM_USE_V1: "1"

src/nemotron/recipes/super3/stage2_rl/stage2_swe1/config/default.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ run:
99
container: "" # Set to nemo-skills-sandbox image path/URI
1010
port: 6000
1111
command: "/start-with-nginx.sh"
12-
persistent_cache: "" # Set to shared cache dir (e.g. /lustre/.../cache)
12+
persistent_cache: "" # Set to shared cache dir (e.g. ${NEMO_RUN_DIR:-.}/cache/super3/stage2_rl)
1313
apptainer: true # Install apptainer inside the container at job start
1414
env_vars:
1515
NRL_WG_USE_RAY_REF: "1"

src/nemotron/recipes/super3/stage2_rl/stage2_swe2/config/default.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ run:
99
container: "" # Set to nemo-skills-sandbox image path/URI
1010
port: 6000
1111
command: "/start-with-nginx.sh"
12-
persistent_cache: "" # Set to shared cache dir (e.g. /lustre/.../cache)
12+
persistent_cache: "" # Set to shared cache dir (e.g. ${NEMO_RUN_DIR:-.}/cache/super3/stage2_rl)
1313
apptainer: true # Install apptainer inside the container at job start
1414
sif_dir: "" # Path to directory containing .sif images for SWE-bench environments
1515
env_vars:

src/nemotron/recipes/super3/stage2_rl/stage3_rlhf/config/default.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ run:
77
container: "" # Set to nemo-skills-sandbox image path/URI
88
port: 6000
99
command: "/start-with-nginx.sh"
10-
persistent_cache: "" # Set to shared cache dir (e.g. /lustre/.../cache)
10+
persistent_cache: "" # Set to shared cache dir (e.g. ${NEMO_RUN_DIR:-.}/cache/super3/stage2_rl)
1111
env_vars:
1212
NRL_WG_USE_RAY_REF: "1"
1313
NRL_VLLM_USE_V1: "1"

tests/recipes/super3/test_stage2_rl_bridge_data_prep_defaults.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@
7171
"src/nemotron/recipes/super3/stage2_rl/config/data_prep/data_blend_raw.json"
7272
)
7373

74+
RUNTIME_CONFIGS = {
75+
"default": STAGE2_RL_ROOT / "config/default.yaml",
76+
"rlvr": STAGE2_RL_ROOT / "stage1_rlvr/config/default.yaml",
77+
"swe1": STAGE2_RL_ROOT / "stage2_swe1/config/default.yaml",
78+
"swe2": STAGE2_RL_ROOT / "stage2_swe2/config/default.yaml",
79+
"rlhf": STAGE2_RL_ROOT / "stage3_rlhf/config/default.yaml",
80+
}
81+
EXPECTED_PERSISTENT_CACHE_GUIDANCE = "${NEMO_RUN_DIR:-.}/cache/super3/stage2_rl"
82+
7483

7584
def _load_yaml(path: Path) -> tuple[str, dict[str, object]]:
7685
text = path.read_text(encoding="utf-8")
@@ -79,6 +88,18 @@ def _load_yaml(path: Path) -> tuple[str, dict[str, object]]:
7988
return text, data
8089

8190

91+
@pytest.mark.parametrize(("profile", "config_path"), sorted(RUNTIME_CONFIGS.items()))
92+
def test_stage2_rl_runtime_persistent_cache_comment_is_portable(
93+
profile: str,
94+
config_path: Path,
95+
) -> None:
96+
text, data = _load_yaml(config_path)
97+
98+
assert "/lustre/" not in text
99+
assert data["run"]["env"]["persistent_cache"] == "", profile
100+
assert EXPECTED_PERSISTENT_CACHE_GUIDANCE in text
101+
102+
82103
@pytest.mark.parametrize("profile", sorted(CORE_BLEND_CONFIGS))
83104
def test_stage2_rl_core_blend_paths_are_repo_local(profile: str) -> None:
84105
text, data = _load_yaml(CORE_BLEND_CONFIGS[profile])
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# intern_nem_dev_3 - 状态
22

3-
<!-- METADATA:STATUS=Working,TASK=task156_embed_sdg_hf_corpus_revision_guard_s1,SESSION=1 -->
3+
<!-- METADATA:STATUS=Working,TASK=task159_super3_stage2_rl_persistent_cache_comment_portability_s1,SESSION=1 -->
44

55
| 字段 ||
66
|------|-----|
77
| Name | intern_nem_dev_3 |
88
| Status | Working |
9-
| Current Task | task156_embed_sdg_hf_corpus_revision_guard_s1 |
10-
| PR | https://github.com/songCNMS/Nemotron/pull/263 |
9+
| Current Task | task159_super3_stage2_rl_persistent_cache_comment_portability_s1 |
10+
| PR | pending |
1111
| Session | 1 |
12-
| Recent Progress | Opened PR #263 for Embed SDG hf:// pinned SHA guard after focused pytest, py_compile, Ruff, structured mock probe, and diff checks passed |
12+
| Recent Progress | Implemented Stage2 RL persistent_cache comment portability; focused pytest, py_compile, Ruff, static grep/probe, live-surface scan, and diff check passed |
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# task159_super3_stage2_rl_persistent_cache_comment_portability_s1
2+
3+
<!-- METADATA:STATUS=InProgress,ASSIGNEE=intern_nem_dev_3 -->
4+
5+
## Summary
6+
7+
Make Super3 Stage2 RL runtime config `persistent_cache` example comments
8+
portable by replacing scoped `/lustre/.../cache` guidance with
9+
`${NEMO_RUN_DIR:-.}/cache/super3/stage2_rl`, while preserving empty
10+
`persistent_cache` values and runtime semantics.
11+
12+
## Scope
13+
14+
- `src/nemotron/recipes/super3/stage2_rl/config/default.yaml`
15+
- `src/nemotron/recipes/super3/stage2_rl/stage1_rlvr/config/default.yaml`
16+
- `src/nemotron/recipes/super3/stage2_rl/stage2_swe1/config/default.yaml`
17+
- `src/nemotron/recipes/super3/stage2_rl/stage2_swe2/config/default.yaml`
18+
- `src/nemotron/recipes/super3/stage2_rl/stage3_rlhf/config/default.yaml`
19+
- Focused Super3 Stage2 RL config tests.
20+
- Task/status docs for `intern_nem_dev_3`.
21+
22+
## Acceptance
23+
24+
- The five scoped YAML files contain no `/lustre/` example.
25+
- The five scoped YAML files keep `run.env.persistent_cache` as an empty
26+
string.
27+
- The five scoped YAML files include portable cache guidance using
28+
`${NEMO_RUN_DIR:-.}/cache/super3/stage2_rl`.
29+
30+
## Boundaries
31+
32+
- No live Stage2 RL data prep, bridge prep, training, eval, endpoint calls,
33+
W&B, cluster jobs, deploy, artifact upload/download, direct `main`/`master`
34+
push, or self-merge.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# task159_super3_stage2_rl_persistent_cache_comment_portability_s1 history
2+
3+
<!-- METADATA:SESSION=1 -->
4+
5+
## Session 1 - 2026-05-29
6+
7+
- Accepted PM assignment and created branch
8+
`intern_nem_dev_3/task159_super3_stage2_rl_persistent_cache_comment_portability_s1`
9+
from `origin/main` at `0b31358436c38e698c7c2bc3a89871df273df21c`.
10+
- Replaced `/lustre/.../cache` examples in five Super3 Stage2 RL
11+
`persistent_cache` comments with
12+
`${NEMO_RUN_DIR:-.}/cache/super3/stage2_rl`.
13+
- Added a focused static config test proving the five runtime configs keep
14+
`persistent_cache: ""`, include portable cache guidance, and have no
15+
`/lustre/` text.
16+
- Verified focused pytest, `py_compile`, Ruff, scoped `/lustre/` grep,
17+
structured YAML/text probe, added-line live-surface scan, and
18+
`git diff --check` before staging.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# task159_super3_stage2_rl_persistent_cache_comment_portability_s1 knowledge
2+
3+
<!-- METADATA:SESSION=1 -->
4+
5+
## Working Notes
6+
7+
- The Stage2 RL portable cache comment contract is
8+
`${NEMO_RUN_DIR:-.}/cache/super3/stage2_rl`.
9+
- This task is comment/static-test only; runtime `persistent_cache` values and
10+
RL behavior are intentionally unchanged.

0 commit comments

Comments
 (0)