-
Notifications
You must be signed in to change notification settings - Fork 96
feat: add POST /score endpoint for lyric alignment scoring #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jeeftor
wants to merge
11
commits into
ServeurpersoCom:master
Choose a base branch
from
jeeftor:feat/score-endpoint
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2b38981
feat: add POST /score endpoint for lyric alignment scoring
jeeftor 7084db9
fix: address code review issues in /score endpoint
jeeftor 6f0caee
fix: make lyric scoring reference-compatible
jeeftor 080d708
docs: document scoring helpers
jeeftor 515759c
fix: reject malformed alignment metadata
jeeftor 8e2adb2
fix: propagate score cancellation
jeeftor 3e59699
docs: document changed scoring entry points
jeeftor 5c07cd5
ci: cap scoring drift retries
jeeftor c09f22f
fix: correct DTW tie-breaking
jeeftor 519e859
fix: validate score head indices
jeeftor 7f28afe
docs: clarify scoring reference behavior
jeeftor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Check if the upstream Python scoring reference has drifted from the | ||
| # commit pinned in src/dtw-score.h. The C++ port is a snapshot of: | ||
| # ace-step/ACE-Step-1.5@82252c24 | ||
| # acestep/core/scoring/_dtw.py | ||
| # acestep/core/scoring/dit_score.py | ||
| # acestep/core/generation/handler/lyric_score.py | ||
| # acestep/core/generation/handler/lyric_alignment_common.py | ||
| # | ||
| # If the upstream files change, this workflow fails and the C++ port | ||
| # needs re-evaluation. The expected SHA256 hashes are embedded below | ||
| # so there's no separate file to maintain — update all four hashes and | ||
| # the pin comment in dtw-score.h when re-syncing. | ||
| name: Scoring Drift Check | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 8 * * 1' # weekly: Monday 08:00 UTC | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| - name: Fetch upstream Python scoring files | ||
| run: | | ||
| BASE="https://raw.githubusercontent.com/ace-step/ACE-Step-1.5/main" | ||
| CURL=(curl -fsSL --max-time 30 --retry 2 --retry-max-time 60) | ||
| "${CURL[@]}" "$BASE/acestep/core/scoring/_dtw.py" -o _dtw.py | ||
| "${CURL[@]}" "$BASE/acestep/core/scoring/dit_score.py" -o dit_score.py | ||
| "${CURL[@]}" "$BASE/acestep/core/generation/handler/lyric_score.py" -o lyric_score.py | ||
| "${CURL[@]}" "$BASE/acestep/core/generation/handler/lyric_alignment_common.py" -o lyric_alignment_common.py | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Verify hashes match pinned snapshot | ||
| run: | | ||
| # Expected SHA256 of the Python files at commit 82252c24. | ||
| # Update these (and the pin comment in src/dtw-score.h) when | ||
| # re-syncing the C++ port after an upstream algorithm change. | ||
| EXPECTED_DTW="2d2252e7108f296cd26722c7b622e1c1a1ed47c71459a8ff873164c4c1ada962" | ||
| EXPECTED_SCORE="73700ff976549339dad3d6c500f8cbe9a8cce08d1979bbb85e3e3ed53e0605a1" | ||
| EXPECTED_HANDLER="92ccffbe079482b9e0e7a7fc6304a408fa7d996a7f9e88c7b3f819ee5d463510" | ||
| EXPECTED_COMMON="ec35e392a2354696e9def4f98db27c415f09763e839609dd368532971ec0eb08" | ||
|
|
||
| ACTUAL_DTW=$(sha256sum _dtw.py | cut -d' ' -f1) | ||
| ACTUAL_SCORE=$(sha256sum dit_score.py | cut -d' ' -f1) | ||
| ACTUAL_HANDLER=$(sha256sum lyric_score.py | cut -d' ' -f1) | ||
| ACTUAL_COMMON=$(sha256sum lyric_alignment_common.py | cut -d' ' -f1) | ||
|
|
||
| echo "_dtw.py: expected=$EXPECTED_DTW actual=$ACTUAL_DTW" | ||
| echo "dit_score.py: expected=$EXPECTED_SCORE actual=$ACTUAL_SCORE" | ||
| echo "lyric_score.py: expected=$EXPECTED_HANDLER actual=$ACTUAL_HANDLER" | ||
| echo "lyric_alignment_common.py: expected=$EXPECTED_COMMON actual=$ACTUAL_COMMON" | ||
|
|
||
| if [ "$ACTUAL_DTW" != "$EXPECTED_DTW" ]; then | ||
| echo "::error::_dtw.py has drifted from the pinned commit (82252c24)." | ||
| echo "::error::The C++ port in src/dtw-score.h may need updating." | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ "$ACTUAL_SCORE" != "$EXPECTED_SCORE" ]; then | ||
| echo "::error::dit_score.py has drifted from the pinned commit (82252c24)." | ||
| echo "::error::The C++ port in src/dtw-score.h may need updating." | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ "$ACTUAL_HANDLER" != "$EXPECTED_HANDLER" ]; then | ||
| echo "::error::lyric_score.py has drifted from the pinned commit (82252c24)." | ||
| echo "::error::The C++ scoring forward path may need updating." | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ "$ACTUAL_COMMON" != "$EXPECTED_COMMON" ]; then | ||
| echo "::error::lyric_alignment_common.py has drifted from the pinned commit (82252c24)." | ||
| echo "::error::Lyric slicing or model-specific head configuration may need updating." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "No upstream source drift detected against the pinned snapshot." | ||
| echo "The C++ implementation may contain documented correctness fixes." | ||
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.