Conversation
|
Before you submit for review:
If you did not complete any of these, then please explain below. |
r-devulap
left a comment
There was a problem hiding this comment.
Nice tutorial! It currently crashes and needs a small fix to create the directory ./local directory.
| var pqv = new MutablePQVectors(pq); | ||
| var bsp = BuildScoreProvider.pqBuildScoreProvider(vsf, pqv); | ||
|
|
||
| var graphPath = Path.of("./local/tmp.jvgraph"); |
There was a problem hiding this comment.
Running this locally gives me this error:
ada002-100k: 99287 base and 10000 query vectors created, dimensions 1536
Building graph in streaming mode...
Exception in thread "main" java.io.FileNotFoundException: ./local/tmp.jvgraph (No such file or directory)
at java.base/java.io.RandomAccessFile.open0(Native Method)
at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:338)
at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:257)
at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:211)
at io.github.jbellis.jvector.disk.BufferedRandomAccessWriter.<init>(BufferedRandomAccessWriter.java:44)
at io.github.jbellis.jvector.graph.disk.OnDiskGraphIndexWriter$Builder.<init>(OnDiskGraphIndexWriter.java:161)
at io.github.jbellis.jvector.example.tutorial.NvqExample.main(NvqExample.java:98)
at io.github.jbellis.jvector.example.tutorial.TutorialRunner.main(TutorialRunner.java:42)
04:41:20,963 [ERROR] Command execution failed.
There was a problem hiding this comment.
Ah right, I entirely overlooked the need to create a local directory. I changed it to use a temporary file instead, matching the other tutorial.
| var pqv = new MutablePQVectors(pq); | ||
| var bsp = BuildScoreProvider.pqBuildScoreProvider(vsf, pqv); | ||
|
|
||
| var graphPath = Path.of("./local/tmp.jvgraph"); |
There was a problem hiding this comment.
Might want to add
| var graphPath = Path.of("./local/tmp.jvgraph"); | |
| var graphPath = Path.of("./local/tmp.jvgraph"); | |
| Files.createDirectories(graphPath.getParent()); |
There was a problem hiding this comment.
The change to a temporary file should take care of it
| } catch (IOException e) { | ||
| throw new UncheckedIOException(e); | ||
| } | ||
| pb.step(); |
There was a problem hiding this comment.
nice, love the progress bar! would be nice to add this to BenchYAML. I am assuming its thread safe?
There was a problem hiding this comment.
Adds an example showing re-ranking using NVQ.