-
Notifications
You must be signed in to change notification settings - Fork 1
⚡ Bolt: 관측 확률 계산 배열 연산으로 벡터화 (성능 개선) #999
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
Closed
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
67c90c2
perf(chords): vectorize observation probabilities construction
seonghobae 81690fc
chore: dummy commit to re-trigger CI or bypass unrelated npm audit
seonghobae e048bca
test(chords): reject mismatched observation similarity frames
seonghobae 7449ac1
fix(chords): reject similarity frame mismatches
seonghobae 6127fee
chore: bump desktop deps to clear npm audit
seonghobae c03a814
fix: keep dependency remediation in canonical security lane
seonghobae 8638910
test: reject incomplete chord similarity state matrices
seonghobae 92f9f2d
fix(chords): require complete similarity state matrix
seonghobae 4d01026
fix(chords): vectorize similarity broadcasting logic
seonghobae c11f5ed
fix(security): remove unrelated Trivy suppression
seonghobae 8441f85
Merge branch 'develop' into bolt-vectorize-obs-probs-9086880096045871242
seonghobae 46d5677
Merge branch 'develop' into bolt-vectorize-obs-probs-9086880096045871242
seonghobae 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
Some comments aren't visible on the classic Files Changed page.
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
28 changes: 28 additions & 0 deletions
28
services/analysis-engine/tests/test_chord_observation_contract.py
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,28 @@ | ||
| """Test observation probability contracts for the chord recognizer.""" | ||
|
|
||
| import numpy as np | ||
| import pytest | ||
|
|
||
| from bandscope_analysis.chords.chord_recognizer import ChordRecognizer | ||
|
|
||
|
|
||
| def test_observation_probs_reject_similarity_frame_mismatch() -> None: | ||
| """Reject similarity arrays that would otherwise broadcast across frames.""" | ||
| recognizer = ChordRecognizer() | ||
| chromagram = np.ones((12, 5), dtype=np.float64) | ||
| similarity = np.ones((24, 1), dtype=np.float64) | ||
| rms = np.ones(5, dtype=np.float64) | ||
|
|
||
| with pytest.raises(ValueError, match="similarity shape"): | ||
| recognizer._build_observation_probs(chromagram, similarity, rms) | ||
|
|
||
|
|
||
| def test_observation_probs_reject_similarity_chord_state_mismatch() -> None: | ||
| """Reject similarity arrays that do not contain all 24 chord templates.""" | ||
| recognizer = ChordRecognizer() | ||
| chromagram = np.ones((12, 5), dtype=np.float64) | ||
| similarity = np.ones((23, 5), dtype=np.float64) | ||
| rms = np.ones(5, dtype=np.float64) | ||
|
|
||
| with pytest.raises(ValueError, match="similarity shape"): | ||
| recognizer._build_observation_probs(chromagram, similarity, rms) |
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.