Skip to content

Commit f355092

Browse files
author
intern_nem_dev_2
committed
Pin Spark reasoning parser download revision
1 parent 9cf231a commit f355092

6 files changed

Lines changed: 125 additions & 6 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
from __future__ import annotations
2+
3+
import re
4+
from pathlib import Path
5+
6+
REPO_ROOT = Path(__file__).resolve().parents[2]
7+
SPARK_GUIDE = REPO_ROOT / "usage-cookbook/Nemotron-3-Super/SparkDeploymentGuide/README.md"
8+
9+
EXPECTED_REPO = "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4"
10+
EXPECTED_REVISION = "4f0cf9daaeb7a4d5e23f80a00e7ed15f0e03caf6"
11+
EXPECTED_FILE = "super_v3_reasoning_parser.py"
12+
EXPECTED_URL = (
13+
f"https://huggingface.co/{EXPECTED_REPO}/resolve/{EXPECTED_REVISION}/{EXPECTED_FILE}"
14+
)
15+
16+
17+
def _spark_guide_text() -> str:
18+
return SPARK_GUIDE.read_text(encoding="utf-8")
19+
20+
21+
def _reasoning_parser_wget_urls(text: str) -> list[str]:
22+
return re.findall(r"wget\s+(https://huggingface\.co/\S+/super_v3_reasoning_parser\.py)", text)
23+
24+
25+
def test_spark_reasoning_parser_downloads_are_commit_pinned() -> None:
26+
urls = _reasoning_parser_wget_urls(_spark_guide_text())
27+
28+
assert urls == [EXPECTED_URL, EXPECTED_URL]
29+
for url in urls:
30+
assert EXPECTED_REPO in url
31+
assert EXPECTED_REVISION in url
32+
assert re.search(r"/resolve/[0-9a-f]{40}/super_v3_reasoning_parser\.py$", url)
33+
34+
35+
def test_spark_reasoning_parser_downloads_have_no_floating_main_ref() -> None:
36+
text = _spark_guide_text()
37+
38+
assert "/raw/main/super_v3_reasoning_parser.py" not in text
39+
assert "/resolve/main/super_v3_reasoning_parser.py" not in text
40+
assert "/main/super_v3_reasoning_parser.py" not in text
41+
42+
43+
def test_spark_guide_keeps_vllm_and_trt_llm_sections() -> None:
44+
text = _spark_guide_text()
45+
46+
assert "## vLLM" in text
47+
assert "## TensorRT-LLM" in text

usage-cookbook/Nemotron-3-Super/SparkDeploymentGuide/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Three properties of Nemotron 3 Super that directly affect inference configuratio
1919
Both vLLM and TRT-LLM require the Nemotron 3 Super reasoning parser. Download it before starting the server:
2020

2121
```bash
22-
wget https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4/raw/main/super_v3_reasoning_parser.py
22+
wget https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4/resolve/4f0cf9daaeb7a4d5e23f80a00e7ed15f0e03caf6/super_v3_reasoning_parser.py
2323
```
2424

2525
---
@@ -35,7 +35,7 @@ vllm/vllm-openai:cu130-nightly
3535
### Serve Command
3636

3737
```bash
38-
wget https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4/raw/main/super_v3_reasoning_parser.py
38+
wget https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4/resolve/4f0cf9daaeb7a4d5e23f80a00e7ed15f0e03caf6/super_v3_reasoning_parser.py
3939

4040
docker run --rm -it --gpus all \
4141
-e VLLM_NVFP4_GEMM_BACKEND=marlin \
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# intern_nem_dev_2 - 状态
22

3-
<!-- METADATA:STATUS=Working,TASK=task168_lora_text2sql_bird_dataset_revision_pins_s1,ROLE=independent -->
3+
<!-- METADATA:STATUS=Working,TASK=task170_super_spark_reasoning_parser_revision_pin_s1,ROLE=independent -->
44

55
| 字段 ||
66
|------|-----|
77
| Name | intern_nem_dev_2 |
88
| Status | Working |
9-
| Current Task | task168_lora_text2sql_bird_dataset_revision_pins_s1 |
10-
| PR | https://github.com/songCNMS/Nemotron/pull/275 |
9+
| Current Task | task170_super_spark_reasoning_parser_revision_pin_s1 |
10+
| PR | pending |
1111
| Session | 1 |
1212

13-
最近进展:Opened PR #275 for `task168_lora_text2sql_bird_dataset_revision_pins_s1`: https://github.com/songCNMS/Nemotron/pull/275. Branch was refreshed from `origin/main` base `6328c018a86da7448e11a03bc1c71afc38e067f2`. Added static BIRD Text2SQL dataset revision pins and focused AST tests. Checks passed: focused pytest (`3 passed`), py_compile, Ruff, structured AST probe, added-line live-surface scan, and diff checks. No live dataset download, Text2SQL data prep run, train/eval, endpoint, W&B, cluster, deploy, artifact upload/download, main/master push, or self-merge.
13+
最近进展:Started `task170_super_spark_reasoning_parser_revision_pin_s1` from `origin/main` base `6500fdaa27735197da87ca25d641a2883b00e8e6` on branch `intern_nem_dev_2/task170_super_spark_reasoning_parser_revision_pin_s1`. Replaced Spark guide reasoning-parser `raw/main` download examples with commit-pinned `resolve/4f0cf9daaeb7a4d5e23f80a00e7ed15f0e03caf6` URLs and added focused static tests; PR creation is pending. No live wget/curl, HF/model download, vLLM/TRT-LLM launch, endpoint, W&B, cluster, deploy, artifact operation, main/master push, or self-merge.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# task170_super_spark_reasoning_parser_revision_pin_s1
2+
3+
<!-- METADATA:STATUS=InProgress,ASSIGNEE=intern_nem_dev_2 -->
4+
5+
Status: In progress
6+
Owner: intern_nem_dev_2
7+
Branch: `intern_nem_dev_2/task170_super_spark_reasoning_parser_revision_pin_s1`
8+
Base: `6500fdaa27735197da87ca25d641a2883b00e8e6`
9+
PR: pending
10+
11+
## Summary
12+
13+
Pin the Spark deployment guide examples that download
14+
`super_v3_reasoning_parser.py` so users do not fetch a drifting Hugging Face
15+
`main` branch file.
16+
17+
## Scope
18+
19+
- `usage-cookbook/Nemotron-3-Super/SparkDeploymentGuide/README.md`
20+
- Focused static docs test under `tests/usage_cookbook/`
21+
- Task/status docs for `intern_nem_dev_2`
22+
23+
## Pin
24+
25+
- Repo: `nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4`
26+
- Revision: `4f0cf9daaeb7a4d5e23f80a00e7ed15f0e03caf6`
27+
- File: `super_v3_reasoning_parser.py`
28+
29+
## Boundaries
30+
31+
- Docs/static-test only.
32+
- No live wget/curl, HF/model download, vLLM/TRT-LLM launch, endpoint call,
33+
W&B run, cluster job, deploy, artifact operation, direct `main`/`master`
34+
push, or self-merge.
35+
36+
## Acceptance Checks
37+
38+
- PASS: `PYTHONPATH=src /work-agents/.venv/bin/python -m pytest -q tests/usage_cookbook/test_spark_reasoning_parser_revision.py` (3 passed)
39+
- PASS: `/work-agents/.venv/bin/python -m py_compile tests/usage_cookbook/test_spark_reasoning_parser_revision.py`
40+
- PASS: `/work-agents/.venv/bin/ruff check tests/usage_cookbook/test_spark_reasoning_parser_revision.py`
41+
- PASS: structured static probe for exact pinned reasoning-parser URLs and no `raw/main`
42+
- PASS: added-line live-surface scan showed only Spark guide static wget examples
43+
- PASS: `git diff --check`
44+
- PASS: `git diff --cached --check`
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# task170_super_spark_reasoning_parser_revision_pin_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_2/task170_super_spark_reasoning_parser_revision_pin_s1`
9+
from `origin/main` at `6500fdaa27735197da87ca25d641a2883b00e8e6`.
10+
- Replaced two Spark guide `super_v3_reasoning_parser.py` Hugging Face
11+
`raw/main` wget URLs with commit-pinned `resolve/4f0cf9...` URLs.
12+
- Preserved the guide's vLLM/TRT-LLM command semantics and parser filename.
13+
- Added focused static tests that inspect the markdown without downloading or
14+
launching any serving stack.
15+
- Verified focused pytest, `py_compile`, Ruff, structured static probe,
16+
added-line live-surface scan, and diff checks.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# task170_super_spark_reasoning_parser_revision_pin_s1 knowledge
2+
3+
<!-- METADATA:SESSION=1 -->
4+
5+
## Working Notes
6+
7+
- PM-provided metadata-only model revision:
8+
`4f0cf9daaeb7a4d5e23f80a00e7ed15f0e03caf6`.
9+
- The pinned parser URL is:
10+
`https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4/resolve/4f0cf9daaeb7a4d5e23f80a00e7ed15f0e03caf6/super_v3_reasoning_parser.py`
11+
- Tests must inspect the Spark guide statically and must not run `wget`, `curl`,
12+
HF/model downloads, vLLM, or TRT-LLM.

0 commit comments

Comments
 (0)