Skip to content

Establish Upfront Dataset Manifest and Path Verification Layer #6

Description

@purvanshjoshi

Technical Overview

Currently, the training script parses dataset manifests and validates path alignments inside the training thread pool during data collation. If manifest paths are broken or files are missing, the pipeline crashes late in the process, wasting significant compute allocation.

Affected Modules

  • File: src/train.py & src/utils.py

Acceptance Criteria

  1. Immediate Verification: The training script verifies dataset manifests and local audio paths immediately on launch.
  2. Diagnostic Errors: Detailed path failures are logged indicating exactly which manifest lines are malformed.
  3. Zero Waste: The training script terminates before allocating GPU tensors or loading models if verification fails.

Proposed Implementation Approach

Add a lightweight, fast-pass manifest validator function prior to importing heavy models:

def verify_manifests(manifest_paths):
    import json
    for path in manifest_paths:
        if not os.path.exists(path):
            raise FileNotFoundError(f"Manifest path not found: {path}")
        with open(path, "r") as f:
            for i, line in enumerate(f):
                entry = json.loads(line)
                if "audio_filepath" not in entry or not os.path.exists(entry["audio_filepath"]):
                    raise FileNotFoundError(f"Audio file referenced on line {i+1} in {path} does not exist: {entry.get('audio_filepath')}")

Severity & Priority

  • Severity: Medium (Reduces debug turnaround times)
  • Priority: P2

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions