File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
jvector-examples/src/main/java/io/github/jbellis/jvector/example Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -830,8 +830,16 @@ public static List<BenchResult> runAllAndCollectResults(
830830
831831 var compressor = getCompressor (buildCompressor , ds );
832832 var searchCompressorObj = getCompressor (searchCompressor , ds );
833- CompressedVectors cvArg = (searchCompressorObj instanceof CompressedVectors ) ? (CompressedVectors ) searchCompressorObj : null ;
834-
833+ // Encode vectors for reranking if a compressor is provided
834+ CompressedVectors cvArg ;
835+ if (searchCompressorObj == null ) {
836+ cvArg = null ;
837+ } else {
838+ cvArg = searchCompressorObj .encodeAll (ds .getBaseRavv ());
839+ System .out .format ("%s: %s encoded %d vectors [%.2f MB] for search%n" ,
840+ ds .getName (), searchCompressorObj , ds .getBaseVectors ().size (),
841+ (cvArg .ramBytesUsed () / 1024f / 1024f ));
842+ }
835843 // If cache is disabled, we use the (tmp) testDirectory as the output
836844 Path outputDir = cache .isEnabled () ? cache .cacheDir ().toAbsolutePath () : testDirectory ;
837845
You can’t perform that action at this time.
0 commit comments