test_search_result_context_calculation fails on x86 darwin #3

Closed
opened 2026-02-16 04:15:05 -05:00 by yindo · 3 comments
Owner

Originally created by @amadejkastelic on GitHub (Sep 3, 2025).

Ran across the following failure on x86 darwin when trying to package semtools in nixpkgs:

test tests::test_search_documents_with_max_distance ... ok
test tests::test_search_result_context_calculation ... FAILED

failures:

---- tests::test_search_result_context_calculation stdout ----

thread 'tests::test_search_result_context_calculation' panicked at src/bin/search.rs:322:13:

assertion left == right failed

left: 2

right: 3

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

failures:

tests::test_search_result_context_calculation

test result: FAILED. 7 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

error: test failed, to rerun pass --bin search
Originally created by @amadejkastelic on GitHub (Sep 3, 2025). Ran across the following failure on x86 darwin when trying to package semtools in nixpkgs: ``` test tests::test_search_documents_with_max_distance ... ok test tests::test_search_result_context_calculation ... FAILED failures: ---- tests::test_search_result_context_calculation stdout ---- thread 'tests::test_search_result_context_calculation' panicked at src/bin/search.rs:322:13: assertion left == right failed left: 2 right: 3 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace failures: tests::test_search_result_context_calculation test result: FAILED. 7 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s error: test failed, to rerun pass --bin search ```
yindo closed this issue 2026-02-16 04:15:05 -05:00
Author
Owner

@logan-markewich commented on GitHub (Sep 3, 2025):

Hmm, I think in some machines the similarity function can be slightly different. Since im using constant vectors, floating point error has measurable impact.

I'll redesign the test to account for this

@logan-markewich commented on GitHub (Sep 3, 2025): Hmm, I think in some machines the similarity function can be slightly different. Since im using constant vectors, floating point error has measurable impact. I'll redesign the test to account for this
Author
Owner

@amadejkastelic commented on GitHub (Sep 3, 2025):

Here is the run: https://github.com/amadejkastelic/nixpkgs-review-gha/actions/runs/17431732970/job/49491508641
It was run without modifying any code. I'll also look into the code.

@amadejkastelic commented on GitHub (Sep 3, 2025): Here is the run: https://github.com/amadejkastelic/nixpkgs-review-gha/actions/runs/17431732970/job/49491508641 It was run without modifying any code. I'll also look into the code.
Author
Owner

@logan-markewich commented on GitHub (Sep 3, 2025):

@amadejkastelic I think the above PR should fix it -- decided that the embedding model is lightweight enough to just use it in tests. Should be more realistic imo

@logan-markewich commented on GitHub (Sep 3, 2025): @amadejkastelic I think the above PR should fix it -- decided that the embedding model is lightweight enough to just use it in tests. Should be more realistic imo
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/semtools#3