tensorflow / tensorflow/recommenders
Getting error 'Op type not registered 'Scann>ScannSearchBatched' while inferencing a TF recommender SCANN model in Java
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2k
- Forks
- 300
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I trained a ScaNN powered model described here in Python.
Tf version: 2.7.0
Environment: Mac and Ubuntu
I am trying to infer it in JAVA using native tensorflow-core-platform version 0.4.0
Java code:
URL modelURL = Main.class.getClassLoader().getResource("model/1");
String modelPath = Paths.get(modelURL.toURI()).toString();
SavedModelBundle model = SavedModelBundle.load(modelPath, "serve");
I am getting error Op type not registered 'Scann>ScannSearchBatched' in binary running on xx. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
Please let me know what's going on?
I know Mac is not supported by ScaNN but its not working on Ubuntu too.
So Can I use Tf native core platform in JAVA for Scann based model?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Python ScaNN model described in the linked TensorFlow Recommenders example and the Java call to SavedModelBundle.load. Reproduce the missing Scann>ScannSearchBatched error on Ubuntu with TensorFlow 2.7.0 and tensorflow-core-platform 0.4.0, then determine whether this model is supported in Java and record the compatibility result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100