Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
T
Tidal
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • PLN
  • Tidal
  • Repository

Switch branch/tag
  • Tidal
  • armada
  • api
  • engines
  • grade.py
Find file
BlameHistoryPermalink
  • PLN (Algolia)'s avatar
    feat(douanier): /grade endpoint — the Foundry loop grader as a building block (#39) · cd3caa7c
    Exposes the Foundry's mechanical loop-quality grader (the "katana") on
    /audio/v1/grade: upload a loop/one-shot → composite 0..1 + S/A/B/C/D tier,
    per-rule sub-scores (seam click, zero-crossing cleanliness, DC, bar
    self-consistency, level, bass mono-compat) + human-readable flags. scope `grade`,
    cached, torch-free. Directly serves "iterate on sampling quality".
    
    engines/grade.py is a BYTE-FOR-BYTE vendored copy of tools/foundry/engine/grade.py
    (self-contained — numpy/soundfile/pydantic/librosa, no Foundry/torch — because the
    container holds only armada/api/). It's kept identical on purpose, and
    tests/test_grade_endpoint.py is a DRIFT GUARD: it imports the Foundry canonical
    standalone and asserts the vendored copy grades identically (grade/tier/sub +
    WEIGHTS/THRESH) on a synth signal — a future Foundry tweak that isn't re-vendored
    fails CI here, not silently in prod (parsers-over-copy, applied to a vendored copy).
    
    Validated in the torch-free container (healthz engines now emotion/features/
    samples/grade/separate; a sine tone grades D with a correct seam-click flag) +
    43/43 tests. Note: this is the CPU-doable slice of #31's /loops /grade /correlate
    — the finder (/loops) and corpus correlation (/correlate) remain.
    PLN (Algolia) authored Jun 25, 2026
    cd3caa7c
grade.py 13.4 KB
EditWeb IDE
×

Replace grade.py

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.