docs: training runbook v0 + convert_manifest.py (closes #18) - #21
Open
wangchen615 wants to merge 2 commits into
Open
docs: training runbook v0 + convert_manifest.py (closes #18)#21wangchen615 wants to merge 2 commits into
wangchen615 wants to merge 2 commits into
Conversation
Closes #18. End-to-end training workflow documentation (unvalidated v0) plus the manifest-conversion tool referenced throughout. New files: - docs/training-runbook.md (~350 lines): prerequisites, data organization, workflow diagram, step-by-step LoRA recipe, full-parameter alternative, nemo2riva handoff, shutdown checklist, known-unknowns for post-first-run correction. Opens with an UNVALIDATED banner — commands may need adjustment on first NERC run with NeMo 25.04 x Nemotron-Streaming. - src/training/convert_manifest.py: converts repo manifest.json into NeMo JSONL. Handles missing fields (native_lang/model/scenario), deterministic (voice, sentence_id) hash-based splits, optional 24 kHz -> 16 kHz idempotent resampling, --keep-punctuation, --minimal, --split-mode none|three-way|per-accent, summary.json with per-split + per-accent counts and duration totals. - src/training/__init__.py (empty), src/training/README.md (short orientation). Modified: - pyproject.toml: add soundfile, scipy, numpy to runtime deps. - .gitignore: ignore data/manifests/, data/synthetic_16k/, data/experiments/ (all derived/runtime artifacts). - CLAUDE.md: new Training section pointing at the runbook. Smoke test against real audio is tracked as #20 — local checkout lacks the synthetic wav files (gitignored), so the conversion script has only passed lint + structural validation here. First real run on NERC will validate both the script and the runbook commands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services. |
Per PR #21 review: full-parameter fine-tuning is the default path for this project's small accented corpus; LoRA stays as an alternative for per-accent adapter experiments and rapid iteration. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
wangchen615
commented
May 18, 2026
wangchen615
left a comment
Contributor
Author
There was a problem hiding this comment.
Note
This review was generated by Codex.
- [P2]
docs/training-runbook.md:302-305Thenemo2rivastep currently depends on the user-localPATH. On the PR #15 pod,pip install nemo2rivawill often land under/tmp/.local/bin, which is not added toPATH, so the nextnemo2rivacommand can fail withcommand not found. The runbook should usepython -m nemo2rivaor export the user bin directory before invoking it. - [P2]
docs/training-runbook.md:162-164The manifest rewrite hardcodes/Users/chenw615/..., so contributors using a different checkout path will leaveaudio_filepathpointing at the laptop path instead of/data/synthetic_16k/...inside the pod. The rewrite needs to derive the local prefix dynamically or the converter needs a configurable output root. - [P2]
docs/training-runbook.md:217-218RUN_IDis introduced inside the interactive pod shell, but lateroc exec ... /data/experiments/$RUN_ID/...commands are shown from the laptop shell where$RUN_IDis unset. That makes the copy-paste path collapse to/data/experiments//train.log, and the same scoping problem affects the later resume andnemo2rivasnippets after a freshoc rsh. The runbook should tell users to substitute a concrete run id or persist/export it before leaving the original shell.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #18. First end-to-end training documentation for this repo, plus the manifest-conversion tool it depends on. Marked v0 UNVALIDATED — commands have not been run against NeMo 25.04 × Nemotron-Streaming on NERC yet. Bugs are expected; they become follow-up PRs.
What this PR does
docs/training-runbook.md(~350 lines): prerequisites, data organization diagram, workflow overview, step-by-step LoRA recipe (primary), full-parameter fine-tuning as an alternative section,nemo2rivahandoff to Riva serving, shutdown checklist, and a "Known unknowns" section listing every item that may need correction after the first real run (script paths, decoder type, tokenizer behavior, sample-rate assumption).src/training/convert_manifest.py: convertsdata/synthetic/<run>/manifest.json→ NeMo JSONL. Key features:native_lang/model/scenario).voice, sentence_id) so reruns are reproducible.scipy.signal.resample_poly; skips already-resampled targets).--split-mode {none|three-way|per-accent},--keep-punctuation,--minimal,--no-write-summary.<stem>.summary.jsonwith per-split / per-accent counts and total duration.src/training/__init__.py(empty) andsrc/training/README.md(short orientation pointing at the runbook).pyproject.toml:soundfile>=0.12,scipy>=1.13,numpy>=1.26added as runtime deps..gitignore: ignoresdata/manifests/,data/synthetic_16k/,data/experiments/(all derived or runtime).CLAUDE.md: new Training section pointing at the runbook.Validation status
uv syncinstalls new deps cleanly.uv run pre-commit runpasses (ruff, ruff-format, yamllint, trailing-whitespace, EOF, merge-conflict, large-file)..wavfiles underdata/synthetic/qwen3tts_20260330_001/aren't in the local checkout. Smoke test is tracked as Smoke test convert_manifest.py with real audio on data/synthetic/* #20 — user plans to upload audio soon. Script has been structurally validated only.Why land v0 now
The user is about to attempt a first NERC training run. Having a written starting point — even unvalidated — is strictly better than guessing from memory. The runbook's "Known unknowns" section and #20 (smoke test) + #18 (post-run correction) make the drift-tolerance explicit.
Related issues
convert_manifest.py)🤖 Generated with Claude Code