Dzung Bui
Dzung Bui
You can change utils.py, line 58 `with tf.device('/gpu:0'): ` to `with tf.device('/cpu:0'): `
@mikemccand I'm wondering if there is already some benchmark that can show the RAM saved by this change
> We might instead just switch to off-heap building once the expected FST size crosses a threshold? We can use createTempOutput to make temporary files as needed for the non-root...
@mikemccand I tried to use `createTempOutput` when the size is beyond some threshold. The logic works, but I got this exception ``` java.lang.IllegalArgumentException: invalid codec filename '_field_temp_2.tmp', cannot end with...
If there is a way to create temp file outside of the search index, then it would work too, but I can't find it as all I/O are accessible from...
Oh `Directory.deleteFile` is exactly what I needed! It's silly that I missed that. I'll post another revision soon.
I've updated to use temp IndexOutput and modify the test. It seems to be working now. I'm open for suggestion of the default block heap threshold and how to configure...
@mikemccand I've added the suggestion so that baby-giant FST will also be written off-heap if they are above some threshold. Let me know if there is other changes needed.
Here is one simple way to do it: ``` public static CompletableFuture toCompletableFuture(Promise promise) { var future = new CompletableFuture(); promise.done(future::complete).fail(future::completeExceptionally); return future; } ```
I think measuring latency impact would also be important for this change as off-heap will be slower (I understand that we are only adding off-heap as an option here, not...