tensorflow / tensorflow/recommenders

Getting error 'Op type not registered 'Scann>ScannSearchBatched' while inferencing a TF recommender SCANN model in Java

Open
#597 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.