You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "tteofili (via GitHub)" <gi...@apache.org> on 2025/11/21 09:43:06 UTC
[PR] TestVectorUtilSupport increase delta for larger vector sizes [lucene]
tteofili opened a new pull request, #15443:
URL: https://github.com/apache/lucene/pull/15443
Comparing results of vector functions with and without Panama support might lead to larger discrepancies as the vector dimensionality grows.
For example:
```
./gradlew test --tests TestVectorUtilSupport.testMinMaxScalarQuantize -Dtests.seed=A315683B50AE2A0 -Dtests.locale=bho -Dtests.timezone=GMT -Dtests.asserts=true -Dtests.file.encoding=UTF-8
```
fails with:
```
TestVectorUtilSupport > testMinMaxScalarQuantize {p0=4096} FAILED
java.lang.AssertionError: expected:<1770.3743896484375> but was:<1770.3133544921875>
at __randomizedtesting.SeedInfo.seed([A315683B50AE2A0:B5176B347F30D775]:0)
...
```
this simply increases the base [delta](https://github.com/apache/lucene/blob/main/lucene/core/src/test/org/apache/lucene/internal/vectorization/TestVectorUtilSupport.java#L42) from 1e-5 to 1e-4.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] TestVectorUtilSupport increase delta for larger vector sizes [lucene]
Posted by "benwtrent (via GitHub)" <gi...@apache.org>.
benwtrent commented on code in PR #15443:
URL: https://github.com/apache/lucene/pull/15443#discussion_r2549660310
##########
lucene/core/src/test/org/apache/lucene/internal/vectorization/TestVectorUtilSupport.java:
##########
@@ -39,7 +39,7 @@ public class TestVectorUtilSupport extends BaseVectorizationTestCase {
public TestVectorUtilSupport(int size) {
this.size = size;
// scale the delta with the size
- this.delta = 1e-5 * size;
+ this.delta = 1e-4 * size;
Review Comment:
I don't think its a delta problem. I think its a magnitude problem. Could we take into account the actual magnitude of the vectors, etc?
Something like:
```
float delta = Math.max(eps, eps * Math.max(result1, result2));
assertEquals(result1, result2, Math.max(delta, eps));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] TestVectorUtilSupport increase delta for larger vector sizes [lucene]
Posted by "tteofili (via GitHub)" <gi...@apache.org>.
tteofili merged PR #15443:
URL: https://github.com/apache/lucene/pull/15443
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org