[codex] docs: add long-form audio cutting guide#2136
Conversation
Signed-off-by: Lawrence Lane <llane@nvidia.com>
Greptile SummaryThis PR adds a comprehensive Fern tutorial (
Confidence Score: 5/5Documentation-only change with no modifications to runtime code; all technical claims verified against the implementation. Every stage contract, CLI default, Python API call signature, and metrics field name in the new tutorial was cross-checked against planning.py, io.py, finalize.py, utils.py, and run.py. The histogram boundary note, shard lifecycle warnings, dry-run stale-tar caveat, and corrupted_audio/missing_audio sparsity behaviour all match the source. Navigation entries in main.yml and the cross-link bullets in the five existing pages are correct. No runtime code is touched. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Long-form JSONL manifest"] --> B["Stage 0: ReadLongFormManifestStage\n(fan-out: 1 task per row)"]
B --> C["Stage 1: OverlapFilterStage\n(drop empty + overlapping segments)"]
C --> D["Stage 2: SnippetCutPlannerStage\n(greedy pack into bounded snippets)"]
D --> E["Stage 3: SnippetRepetitionFilterStage\n(n-gram repetition drop; no audio I/O)"]
E --> F["Stage 4: SnippetExtractionStage\n(fan-out: 1 task per snippet;\nread to mono to resample to encode to tar shard)"]
F --> G["Stage 5: SnippetManifestWriterStage\n(per-worker JSONL shards)"]
G --> H["Stage 6: PretrainMetricsAggregatorStage\n(per-worker metrics JSONL shards)"]
subgraph Driver ["Driver-side finalization"]
I["prepare: delete stale shard files"]
J["finalize: merge manifest + metrics + tar shards"]
K["reconcile manifest against tar"]
L["patch metrics with reconcile drop counts"]
I --> J --> K --> L
end
B -.->|"dry-run: skips audio I/O"| F
H --> Driver
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["Long-form JSONL manifest"] --> B["Stage 0: ReadLongFormManifestStage\n(fan-out: 1 task per row)"]
B --> C["Stage 1: OverlapFilterStage\n(drop empty + overlapping segments)"]
C --> D["Stage 2: SnippetCutPlannerStage\n(greedy pack into bounded snippets)"]
D --> E["Stage 3: SnippetRepetitionFilterStage\n(n-gram repetition drop; no audio I/O)"]
E --> F["Stage 4: SnippetExtractionStage\n(fan-out: 1 task per snippet;\nread to mono to resample to encode to tar shard)"]
F --> G["Stage 5: SnippetManifestWriterStage\n(per-worker JSONL shards)"]
G --> H["Stage 6: PretrainMetricsAggregatorStage\n(per-worker metrics JSONL shards)"]
subgraph Driver ["Driver-side finalization"]
I["prepare: delete stale shard files"]
J["finalize: merge manifest + metrics + tar shards"]
K["reconcile manifest against tar"]
L["patch metrics with reconcile drop counts"]
I --> J --> K --> L
end
B -.->|"dry-run: skips audio I/O"| F
H --> Driver
Reviews (9): Last reviewed commit: "Merge branch 'main' into codex/docs-long..." | Re-trigger Greptile |
Signed-off-by: Lawrence Lane <llane@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-codex-docs-long-form-audio-cutting.docs.buildwithfern.com/nemo/curator Here are the markdown pages you've updated: |
|
@sarahyurick @yqwangustc @mohammadaaftabv friendly ping on this docs PR for the #2118 release-docs workstream — when you have a moment, could you take a look at the long-form audio cutting guide? Docs preview: https://nvidia-preview-codex-docs-long-form-audio-cutting.docs.buildwithfern.com/nemo/curator Thanks! |
|
Thanks for the detailed review. This PR is docs-only (we handle documentation, not the stage code), so I've updated the guide to accurately document the current behavior and added the "at minimum" guidance you called out. The underlying behavior changes are flagged below as follow-up engineering work. Fixed in docs (commit b20eb2c)
The greptile Python-API Suggested engineering follow-ups (out of scope here — code, not docs)These change stage behavior and belong in a code PR against
Happy to open a tracking issue for these if that's useful. |
|
ok to test b20eb2c |
- state that source IDs must be unique after tar-key normalization (make_snippet_id replaces . / \ with _, so session.1 and session_1 collide) - clarify that a missing segments key fails OverlapFilterStage validation, while an empty list is accepted and yields zero snippets - warn that dry runs must use a fresh, nonexistent tar path so preview manifests are not reconciled against a stale archive - document the missing_audio/corrupted_audio counters as sparse and recommend defensive .get() access; drop the misleading zero-valued key from the example metrics JSON Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
b20eb2c to
dcfcc1f
Compare
|
ok to test dcfcc1f |
|
@mohammadaaftabv thanks again for the detailed review — this is now ready for another pass. Since the PR is docs-only, I updated the guide to accurately describe the current behavior and added the "at minimum" guidance you flagged (commit dcfcc1f). Your five inline points (dry-run vs. stale tar reconciliation, ID collision after |
Summary
Why
The workflow introduced by #1898 and stabilized by #1835 was discoverable only through
tutorials/audio/audio_pretrain/README.md. Users had no Fern guidance for preparing the source schema, choosing path semantics, sizing a run with--dry-run, interpreting the output archive and metrics, or safely operating the multi-worker shard lifecycle.This page also distinguishes physical snippet extraction from the existing ALM metadata-window tutorial so users can choose the correct workflow.
Validation
fern check— 0 errors (103 existing warnings)fern docs broken-links— no errors in changed pages; 22 pre-existing API-reference errors elsewhere_build_parser()tests/stages/audio/alm/pretrainsuite — 123 passedpython -m py_compilefor the tutorial runner and all pretraining pipeline modulesgit diff --cached --checkThe repository enforces Linux at import time. Focused tests were run on this macOS host by bypassing only that package-level guard and excluding the unrelated session-wide Ray cluster fixture; stage code and declared
audio_cpudependencies were otherwise used directly.Closes #2122