Skip to content

Commit a9b324b

Browse files
songCNMSintern_nem_dev_1
andauthored
Make public long-document SDG docs paths portable (#269)
* Make public long-document SDG docs paths portable * Record task162 PR status * Fix task162 history metadata --------- Co-authored-by: intern_nem_dev_1 <intern_nem_dev_1@intern.local>
1 parent f437b05 commit a9b324b

6 files changed

Lines changed: 59 additions & 8 deletions

File tree

docs/nemotron/data/sdg/long-document.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Each stage works in two modes:
4747
```bash
4848
nemotron data sdg long-document ocr --batch <profile> -c 02-ocr \
4949
vllm_endpoint=http://compute-node:8000/v1 \
50-
seed_path=/lustre/.../seed.parquet \
50+
seed_path=${NEMO_RUN_DIR:-.}/output/data/sdg/long-document/seeds/seed_per_page.parquet \
5151
num_records=100
5252
```
5353

@@ -65,7 +65,7 @@ Producer stages (`ocr`, `text-qa`, `page-classification`, `visual-qa`, `single-p
6565
# runs the recipe against it, tears the deployment down on exit.
6666
nemotron data sdg long-document ocr --batch prep --serve \
6767
-c 02-ocr \
68-
seed_path=/lustre/.../seed_per_page.parquet \
68+
seed_path=${NEMO_RUN_DIR:-.}/output/data/sdg/long-document/seeds/seed_per_page.parquet \
6969
num_records=100
7070
```
7171

@@ -115,7 +115,7 @@ See the [recipe README](https://github.com/NVIDIA/nemotron/tree/main/src/nemotro
115115
Once the pipeline runs, the resulting parquet files can be:
116116

117117
- Published to Hugging Face Hub as a public dataset.
118-
- Stored in internal Lustre and registered as a Nemotron / W&B artifact.
118+
- Stored in internal shared output storage and registered as a Nemotron / W&B artifact.
119119
- Consumed directly by training recipes via `dataset.path` or HF-dataset-id config.
120120

121121
The recipe README has copy-pasteable templates for both publish paths.

tests/recipes/data/test_sdg_long_document_docs_portability.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
LONG_DOCUMENT_DIR = REPO_ROOT / "src/nemotron/recipes/data/sdg/long-document"
55
README = LONG_DOCUMENT_DIR / "README.md"
66
OCR_CONFIG = LONG_DOCUMENT_DIR / "config/02-ocr.yaml"
7+
PUBLIC_DOC = REPO_ROOT / "docs/nemotron/data/sdg/long-document.md"
78
PORTABLE_ROOT = "${NEMO_RUN_DIR:-.}/output/data/sdg/long-document"
89

910

@@ -12,14 +13,15 @@ def _read(path: Path) -> str:
1213

1314

1415
def test_long_document_docs_do_not_use_developer_lustre_paths() -> None:
15-
for path in (README, OCR_CONFIG):
16+
for path in (README, OCR_CONFIG, PUBLIC_DOC):
1617
text = _read(path)
1718
assert "/lustre/" not in text, f"{path} still contains a concrete /lustre/ example"
1819

1920

2021
def test_long_document_docs_use_portable_output_examples() -> None:
2122
readme_text = _read(README)
2223
ocr_config_text = _read(OCR_CONFIG)
24+
public_doc_text = _read(PUBLIC_DOC)
2325

2426
for suffix in (
2527
"seeds",
@@ -33,11 +35,13 @@ def test_long_document_docs_use_portable_output_examples() -> None:
3335
assert f"{PORTABLE_ROOT}/{suffix}" in readme_text
3436

3537
assert f"{PORTABLE_ROOT}/seeds/seed_per_page.parquet" in ocr_config_text
38+
assert f"{PORTABLE_ROOT}/seeds/seed_per_page.parquet" in public_doc_text
3639

3740

3841
def test_long_document_docs_preserve_cli_commands_and_options() -> None:
3942
readme_text = _read(README)
4043
ocr_config_text = _read(OCR_CONFIG)
44+
public_doc_text = _read(PUBLIC_DOC)
4145

4246
for snippet in (
4347
"nemotron data sdg long-document seed",
@@ -62,3 +66,12 @@ def test_long_document_docs_preserve_cli_commands_and_options() -> None:
6266
"num_records=100",
6367
):
6468
assert snippet in ocr_config_text
69+
70+
for snippet in (
71+
"nemotron data sdg long-document ocr --batch",
72+
"--serve",
73+
"vllm_endpoint=",
74+
"seed_path=",
75+
"num_records=",
76+
):
77+
assert snippet in public_doc_text
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# intern_nem_dev_1 - 状态
22

3-
<!-- METADATA:STATUS=Working,TASK=task157_data_sdg_long_document_docs_path_portability_s1,ROLE=dev,SESSION=1 -->
3+
<!-- METADATA:STATUS=Working,TASK=task162_long_document_public_docs_path_portability_s1,ROLE=dev,SESSION=1 -->
44

55
| 字段 ||
66
|------|-----|
77
| Name | intern_nem_dev_1 |
88
| Status | Working |
9-
| Current Task | task157_data_sdg_long_document_docs_path_portability_s1 |
10-
| PR | https://github.com/songCNMS/Nemotron/pull/266 |
9+
| Current Task | task162_long_document_public_docs_path_portability_s1 |
10+
| PR | https://github.com/songCNMS/Nemotron/pull/269 |
1111
| Session | 1 |
12-
| Recent Progress | Opened PR #266 for task157; long-document SDG docs/comments now use NEMO_RUN_DIR-relative examples and focused static docs checks passed |
12+
| Recent Progress | Opened PR #269 for task162; public long-document SDG docs now use NEMO_RUN_DIR-relative seed examples and focused static docs checks passed |
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# task162_long_document_public_docs_path_portability_s1
2+
3+
<!-- METADATA:STATUS=InProgress,ASSIGNEE=intern_nem_dev_1,SESSION=1 -->
4+
5+
## Scope
6+
7+
- Replace concrete `/lustre/...` examples in `docs/nemotron/data/sdg/long-document.md` with `${NEMO_RUN_DIR:-.}/output/data/sdg/long-document/...` examples.
8+
- Preserve command names, option names, stage names, manual endpoint flow, `--serve` flow, and public-doc prose semantics.
9+
- Add focused static docs coverage for the public page.
10+
11+
## Boundaries
12+
13+
- No production Python, deployment YAML, CLI behavior, generated artifacts, or unrelated docs.
14+
- No live long-document SDG data prep, `--serve` launch, endpoint calls, downloads, train/eval, W&B, cluster jobs, deploy, artifact operations, main push, or self-merge.
15+
16+
## Status
17+
18+
- Base: `2cb891846c6f86d8917cd6289070c687dfdd6f91`
19+
- Branch: `intern_nem_dev_1/task162_long_document_public_docs_path_portability_s1`
20+
- PR: https://github.com/songCNMS/Nemotron/pull/269
21+
- Checks: focused static docs pytest, py_compile, Ruff, no-`/lustre/` grep, structured public-doc portability probe, added-line live-surface scan, and diff checks passed.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# History Log
2+
3+
<!-- METADATA:SESSION=1 -->
4+
5+
## Session 1 - 2026-05-29
6+
7+
- Started task162 from `origin/main` at `2cb891846c6f86d8917cd6289070c687dfdd6f91`.
8+
- Updated public long-document SDG docs path examples toward `${NEMO_RUN_DIR:-.}/output/data/sdg/long-document/...` portability.
9+
- Extended focused static docs test coverage to include the public docs page.
10+
- Ran focused static docs pytest, py_compile, Ruff, scoped no-`/lustre/` grep, structured public-doc probe, added-line live-surface scan, and `git diff --check`.
11+
- Opened PR #269: https://github.com/songCNMS/Nemotron/pull/269
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Task Knowledge
2+
3+
<!-- METADATA:STATUS=Working,TASK=task162_long_document_public_docs_path_portability_s1,ROLE=dev,SESSION=1 -->
4+
5+
- Public long-document SDG docs should use `${NEMO_RUN_DIR:-.}/output/data/sdg/long-document/...` examples and avoid concrete cluster/user storage paths.
6+
- The task is docs/static-test only; manual endpoint and `--serve` examples must remain recognizable with the same CLI options.

0 commit comments

Comments
 (0)