google / google/struct2tensor

DecodeProtoSparseV4 not registered

Đang mở
#33 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
36
Fork
22
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I'm having issues loading a model produced by gcp vertex ai:
```python
import tensorflow as tf
tf.saved_model.load(MY_MODEL_PATH)
```

I'm receiving error:
```
Traceback (most recent call last):
File "/home/walter/yin-model/py38/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 4177, in _get_op_def
return self._op_def_cache[type]
KeyError: 'DecodeProtoSparseV4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "test.py", line 6, in
imported = tf.saved_model.load(NORMAL)
File "/home/walter/yin-model/py38/lib/python3.8/site-packages/tensorflow/python/saved_model/load.py", line 936, in load
result = load_internal(export_dir, tags, options)["root"]
File "/home/walter/yin-model/py38/lib/python3.8/site-packages/tensorflow/python/saved_model/load.py", line 994, in load_internal
root = load_v1_in_v2.load(export_dir, tags)
File "/home/walter/yin-model/py38/lib/python3.8/site-packages/tensorflow/python/saved_model/load_v1_in_v2.py", line 282, in load
result = loader.load(tags=tags)
File "/home/walter/yin-model/py38/lib/python3.8/site-packages/tensorflow/python/saved_model/load_v1_in_v2.py", line 209, in load
functions = function_deserialization.load_function_def_library(
File "/home/walter/yin-model/py38/lib/python3.8/site-packages/tensorflow/python/saved_model/function_deserialization.py", line 406, in load_function_def_library
func_graph = function_def_lib.function_def_to_graph(
File "/home/walter/yin-model/py38/lib/python3.8/site-packages/tensorflow/python/framework/function_def_to_graph.py", line 70, in function_def_to_graph
graph_def, nested_to_flat_tensor_name = function_def_to_graph_def(
File "/home/walter/yin-model/py38/lib/python3.8/site-packages/tensorflow/python/framework/function_def_to_graph.py", line 239, in function_def_to_graph_def
op_def = default_graph._get_op_def(node_def.op) # pylint: disable=protected-access
File "/home/walter/yin-model/py38/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 4181, in _get_op_def
pywrap_tf_session.TF_GraphGetOpDef(self._c_graph, compat.as_bytes(type),
tensorflow.python.framework.errors_impl.NotFoundError: Op type not registered 'DecodeProtoSparseV4' in binary running on rocky. 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.
```
And running environmnet:
```
$ pip list | grep tensor
struct2tensor 0.39.0
tensorboard 2.8.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
tensorflow 2.8.0
tensorflow-addons 0.16.1
tensorflow-estimator 2.8.0
tensorflow-io-gcs-filesystem 0.32.0
tensorflow-metadata 1.8.0
```
To match the environment that google used to create:
```
$ jq . environment.json
{
"container_uri": "europe-docker.pkg.dev/vertex-ai/automl-tabular/prediction-server:20230630_0325",
"tensorflow": "2.8.0",
"struct2tensor": "0.39.0",
"tensorflow-addons": "0.16.1"
}
```

[This issue](https://stackoverflow.com/questions/68950535/problem-with-deployment-of-automl-model-via-docker-using-automl-model-server-n) suggests that google knows of a fix which they've added to their docker containers.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by reproducing tf.saved_model.load(MY_MODEL_PATH) with the listed TensorFlow and struct2tensor versions. Read load_v1_in_v2.py and function_def_to_graph.py around the reported stack-trace entries, then trace registration of DecodeProtoSparseV4. Done means the Vertex AI model loads without the NotFoundError.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python, tensorflow
Lĩnh vực
machine-learning
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.