-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serving SavedModel files with Tensorflow Java? #126
Comments
Tl;Dr: It's likely possible by first converting to JAX and then to Tensorflow, but our team has not yet tried it. There are two paths for serving from Tensorflow: Using the Tensorflow Decision Forests custom opTensorFlow Decision Forests (TF-DF) defines a custom op for Tensorflow that allows Tensorflow to run tree models generated with YDF or TF-DF itself. This means that you can save a YDF model with To the best of my knowledge, the custom op is not available in TensorFlow Java and no attempts have been made to include it in Tensorflow Java. Pure models by converting YDF -> Jax -> TensorflowWe recently added the possibility to export YDF models to pure JAX functions. JAX functions can be converted to TensorFlow models as shown in this tutorial. The resulting SavedModel is a pure Tensorflow model and should be compatible with all (*) TensorFlow surfaces. We have not tried it with TensorFlow Java, but I'd be very interested if someone has the bandwidth to experiment with it. Note that exporting to JAX is currently implemented for Gradient Boosted Trees only. (*) TFLite support is coming with the next version of YDF. |
I believe people eventually got TFDF models to work with TF-Java, there were a bunch of issues with how TFDF was exporting its symbols which were incompatible with TF-Java's build, but now we're using the same binaries as Python it should work (with TF-Java 1.0.0-rc.1). |
That's super interesting, thank you for letting us know! |
Your documentation mentions :
What about Tensorflow Java? https://github.com/tensorflow/java/releases
If so, which versions are supported?
I was looking to see what version of TensorFlow was required for serving these models, but couldn't tell from the docs.
The text was updated successfully, but these errors were encountered: