feat(audio-alm): agent-ready ALM data-builder and pretrain stages#2179
feat(audio-alm): agent-ready ALM data-builder and pretrain stages#2179shubhamNvidia wants to merge 3 commits into
Conversation
…idency resolver Shared base imported by the audio stage modules to make them agent-ready: - _agent_ready.py: AgentReady mixin, StageContract/IOSpec/Gates/Role - _residency.py: input residency resolver (file/waveform/auto) - common.py: agent-ready helpers (ensure_mono/ensure_waveform_2d) Excludes the agent orchestration layer (registry/catalog/conformance/planning/agent).
Greptile SummaryThis PR makes eight ALM/pretrain audio pipeline stages "agent-ready" by adding an
Confidence Score: 3/5Runtime behavior is unchanged, but several describe() contracts misrepresent what stages actually read/write, which will cause agents to mis-sequence or misconfigure pipelines once the agent layer is activated. The PR accumulates multiple incorrect describe() contracts: ManifestReader declares no writes at all, PreserveByValueStage advertises batch_only=False while process() raises unconditionally, ALMDataOverlapStage underreports its written keys by eight fields, and ALMDataBuilderStage omits a consumed key from its reads. nemo_curator/stages/audio/common.py (ManifestReader missing writes, PreserveByValueStage batch_only mismatch), nemo_curator/stages/audio/alm/alm_data_overlap.py (underreported writes), nemo_curator/stages/audio/alm/alm_data_builder.py (missing reads key) Important Files Changed
Reviews (2): Last reviewed commit: "fix(audio): match _residency.py to found..." | Re-trigger Greptile |
| properties[p.name] = schema | ||
| if p.required: |
There was a problem hiding this comment.
to_json_schema silently drops default: None from the JSON schema
The guard if p.default is not None skips emitting "default": null for parameters whose true default is None. An agent reading the schema cannot distinguish "no default declared" from "default is None", and may incorrectly treat those parameters as required. Using a sentinel (e.g. _MISSING = object()) in ParamSpec to represent "no default" would preserve the distinction.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
…pts/reads helpers)
Summary
Makes the ALM (audio-language-model) data-pipeline stages agent-ready. Additive only.
alm/alm_data_builder.py,alm/alm_data_overlap.py,alm/pretrain/extraction.py,alm/pretrain/io.py,alm/pretrain/planning.py— subclassAgentReadyand adddescribe()/StageContractdeclaring each stage's reads/writes; some hardcoded keys made configurable. Core data-building / planning / IO logic is unchanged.Notes for reviewers
describe()matches what the stage actually reads/writes.Test plan
pytest tests/stages/audio/alm -q