Skip to content
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

[BUG] graph-compress.pb raise message_mod.DecodeError('Field number 0 is illegal.') #4193

Open
xiaoqi-neu1 opened this issue Oct 8, 2024 · 0 comments

Comments

@xiaoqi-neu1
Copy link

Bug summary

dp compress -i graph.pb -o graph-compress.pb 压缩model的时候失败 产生**[5] raise message_mod.DecodeError('Field number 0 is illegal.')
[5] google.protobuf.message.DecodeError: Field number 0 is illegal**.
的问题

DeePMD-kit Version

DeePMD-kit v2.2.11

Backend and its version

TensorFlow 2.16.2、 protobuf 3.20.3

How did you download the software?

Offline packages

Input Files, Running Commands, Error Log, etc.

[5] DEEPMD INFO initialize model from scratch
[5] Traceback (most recent call last):
[5] File "/home/users/dq/.local/bin/dp", line 8, in
[5] sys.exit(main())
[5] ^^^^^^
[5] File "/home/users/dq/.local/lib/python3.11/site-packages/deepmd_utils/main.py", line 657, in main
[5] deepmd_main(args)
[5] File "/home/users/dq/.local/lib/python3.11/site-packages/deepmd/entrypoints/main.py", line 82, in main
[5] compress(**dict_args)
[5] File "/home/users/dq/.local/lib/python3.11/site-packages/deepmd/entrypoints/compress.py", line 149, in compress
[5] train(
[5] File "/home/users/dq/.local/lib/python3.11/site-packages/deepmd/entrypoints/train.py", line 168, in train
[5] _do_work(jdata, run_opt, is_compress)
[5] File "/home/users/dq/.local/lib/python3.11/site-packages/deepmd/entrypoints/train.py", line 290, in _do_work
[5] model.save_compressed()
[5] File "/home/users/dq/.local/lib/python3.11/site-packages/deepmd/train/trainer.py", line 1037, in save_compressed
[5] self.saver.save(self.sess, os.path.join(os.getcwd(), self.save_ckpt))
[5] File "/home/users/dq/.local/lib/python3.11/site-packages/tensorflow/python/training/saver.py", line 1326, in save
[5] self.export_meta_graph(
[5] File "/home/users/dq/.local/lib/python3.11/site-packages/tensorflow/python/training/saver.py", line 1375, in export_meta_graph
[5] graph_def=ops.get_default_graph().as_graph_def(
[5] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[5] File "/home/users/dq/.local/lib/python3.11/site-packages/tensorflow/python/framework/ops.py", line 2463, in as_graph_def
[5] result, _ = self._as_graph_def(
[5] ^^^^^^^^^^^^^^^^^^^
[5] File "/home/users/dq/.local/lib/python3.11/site-packages/tensorflow/python/framework/ops.py", line 2370, in _as_graph_def
[5] graph.ParseFromString(compat.as_bytes(data))
[5] File "/usr/local/anaconda3/lib/python3.11/site-packages/google/protobuf/message.py", line 202, in ParseFromString
[5] return self.MergeFromString(serialized)
[5] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[5] File "/usr/local/anaconda3/lib/python3.11/site-packages/google/protobuf/internal/python_message.py", line 1128, in MergeFromString
[5] if self._InternalParse(serialized, 0, length) != length:
[5] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[5] File "/usr/local/anaconda3/lib/python3.11/site-packages/google/protobuf/internal/python_message.py", line 1178, in InternalParse
[5] raise message_mod.DecodeError('Field number 0 is illegal.')
[5] google.protobuf.message.DecodeError: Field number 0 is illegal
.

Steps to Reproduce

.

Further Information, Files, and Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants