tensorflow / tensorflow/java

SavedModelBundle Unable to Load Models with coo_sparse Encoded Input

Open
#501 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
928
Forks
227
PR merge metrics
No merged PRs in 30d

Description

Was trying to load a model using SavedModelBundle.load(savedModelPath, "serve") but ran into the operand "" does not exist on the graph issue. Error log:
empty_operand_error_log_censored

Looking into Tensorflow Java source code this error is raised here.

And by inspecting the model being loaded the corresponding input tensor is coo_sparse encoded:
coo_sparse_encoded_censored

It appears to me that when building TensorDescription the library doesn't take coo_sparse encoded format into account: code link: it's trying to fetch the name field which is always empty for coo_sparse encoded format, because together with the name field it's oneof in TensorInfo proto: code link.

Is this a known unsupported feature or would the model loading just work if the validation is bypassed?

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 TensorFlow Java's TensorFunction.java and Signature.java, then compare their TensorInfo handling with the coo_sparse oneof in meta_graph.proto. Reproduce loading the described SavedModelBundle and determine whether validation or model loading must change; done means the supported behavior is established and covered by an appropriate regression check or documented as unsupported.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.