50
50
// @com.carrotsearch.randomizedtesting.annotations.Repeat(iterations = 100)
51
51
public class VectorScorerFactoryTests extends AbstractVectorTestCase {
52
52
53
- private static final float DELTA = 1e-4f ;
54
-
55
53
// bounds of the range of values that can be seen by int7 scalar quantized vectors
56
54
static final byte MIN_INT7_VALUE = 0 ;
57
55
static final byte MAX_INT7_VALUE = 127 ;
@@ -260,6 +258,8 @@ void testRandomScorerImpl(long maxChunkSize, Function<Integer, float[]> floatArr
260
258
final byte [][] qVectors = new byte [size ][];
261
259
final float [] corrections = new float [size ];
262
260
261
+ float delta = 1e-6f * dims ;
262
+
263
263
String fileName = "testRandom-" + sim + "-" + dims + ".vex" ;
264
264
logger .info ("Testing " + fileName );
265
265
try (IndexOutput out = dir .createOutput (fileName , IOContext .DEFAULT )) {
@@ -280,7 +280,7 @@ void testRandomScorerImpl(long maxChunkSize, Function<Integer, float[]> floatArr
280
280
281
281
var expected = luceneScore (sim , qVectors [idx0 ], qVectors [idx1 ], correction , corrections [idx0 ], corrections [idx1 ]);
282
282
var scorer = factory .getInt7SQVectorScorer (VectorSimilarityType .of (sim ), values , vectors [idx0 ]).get ();
283
- assertEquals (scorer .score (idx1 ), expected , DELTA );
283
+ assertEquals (scorer .score (idx1 ), expected , delta );
284
284
}
285
285
}
286
286
}
0 commit comments