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

AttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'register_op_list' #34762

Closed
rmbadl opened this issue Dec 2, 2019 · 15 comments
Assignees
Labels
comp:model Model related issues stat:awaiting response Status - Awaiting response from author TF 2.0 Issues relating to TensorFlow 2.0 type:support Support issues

Comments

@rmbadl
Copy link

rmbadl commented Dec 2, 2019

Please go to Stack Overflow for help and support:

https://stackoverflow.com/questions/tagged/tensorflow

If you open a GitHub issue, here is our policy:

  1. It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
  2. The form below must be filled out.
  3. It shouldn't be a TensorBoard issue. Those go here.

Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.


System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): 2.0.0
  • Python version: 3.6
  • Bazel version (if compiling from source): 0.27.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: 10.2
  • GPU model and memory: NVIDIA 970
  • Exact command to reproduce: python3 legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config

You can collect some of this information using our environment capture script:

https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh

You can obtain the TensorFlow version with:

python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the problem

Trying tensorflow's trainning appears an error message about a non existed attribute (register_op_list') . I checked in the file that is supposed to have it and it really doesn't have it.
I looked for that attribute in every single path I thought it could be but I didn't get anything at all.
I have no clue of how I can resolve this.

To resolve the contrib issue of tf2.0 i used tf-slim but if you have a way to resolve it completely that doesn't trigger this error please let me know because I'm quite sure that everything comes because of the "contrib" problem.
Thanks

Source code / logs

### python3 legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config

2019-12-02 13:59:36.908351: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.2
Traceback (most recent call last):
File "legacy/train.py", line 48, in
from tensorflow.contrib import framework as contrib_framework
File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/init.py", line 31, in
from tensorflow.contrib import cloud
File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/init.py", line 24, in
from tensorflow.contrib.cloud.python.ops.bigquery_reader_ops import *
File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/python/ops/bigquery_reader_ops.py", line 21, in
from tensorflow.contrib.cloud.python.ops import gen_bigquery_reader_ops
File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/python/ops/gen_bigquery_reader_ops.py", line 369, in
_op_def_lib = _InitOpDefLibrary(b"\n\355\001\n\016BigQueryReader\032\024\n\rreader_handle\030\007\200\001\001"\027\n\tcontainer\022\006string\032\002\022\000"\031\n\013shared_name\022\006string\032\002\022\000"\024\n\nproject_id\022\006string"\024\n\ndataset_id\022\006string"\022\n\010table_id\022\006string"\027\n\007columns\022\014list(string)"\027\n\020timestamp_millis\022\003int"\034\n\016test_end_point\022\006string\032\002\022\000\210\001\001\n\331\001\n GenerateBigQueryReaderPartitions\032\016\n\npartitions\030\007"\024\n\nproject_id\022\006string"\024\n\ndataset_id\022\006string"\022\n\010table_id\022\006string"\027\n\007columns\022\014list(string)"\027\n\020timestamp_millis\022\003int"\025\n\016num_partitions\022\003int"\034\n\016test_end_point\022\006string\032\002\022\000")
File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/python/ops/gen_bigquery_reader_ops.py", line 277, in _InitOpDefLibrary
_op_def_registry.register_op_list(op_list)
AttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'register_op_list'

@gadagashwini-zz gadagashwini-zz self-assigned this Dec 3, 2019
@gadagashwini-zz gadagashwini-zz added the TF 2.0 Issues relating to TensorFlow 2.0 label Dec 3, 2019
@gadagashwini-zz
Copy link
Contributor

@rmbadl, Provide the complete standalone code to replicate the issue. Thanks!

@gadagashwini-zz gadagashwini-zz added the stat:awaiting response Status - Awaiting response from author label Dec 3, 2019
@rmbadl
Copy link
Author

rmbadl commented Dec 3, 2019

I have no standalone code, the "train.py" code that I use is the tensorflow's one. I was just following this page .
I downloaded tensorflow and bazel and followed each ones guides to install them.. (from their own pages)

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Dec 3, 2019
@gadagashwini-zz
Copy link
Contributor

@rmbadl, Please find the link for Tensorflow Object detection tutorial. Thanks!

@gadagashwini-zz gadagashwini-zz added the stat:awaiting response Status - Awaiting response from author label Dec 5, 2019
@tensorflowbutler
Copy link
Member

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

@gadagashwini-zz gadagashwini-zz added comp:model Model related issues type:support Support issues labels Dec 23, 2019
@gadagashwini-zz
Copy link
Contributor

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

@bjente
Copy link

bjente commented Dec 23, 2019

@gadagashwini I have the same problem.. I'm using Tensorflow 1.14.0 and python 3.7

@gadagashwini-zz
Copy link
Contributor

@bjente,
Can you please post a new issue by providing the information asked by the template?
The reason for this is we can focus on your specific configuration and problem since the root cause can be unrelated even though the error messages are similar. Thanks!

@BV-SS
Copy link

BV-SS commented Jun 10, 2020

same error using tflearn package ==0.3.2 and tenserflow ==1.14

error:'tensorflow.python.framework.op_def_registry' has no attribute 'register_op_list'

@piyushcse29
Copy link

Is anybody working on this? Getting the same error.

@BV-SS
Copy link

BV-SS commented Jul 2, 2020

Is anybody working on this? Getting the same error.

restart the kernel ...maybe that help

@kidJDOG
Copy link

kidJDOG commented Jul 2, 2020

Restart the kernel if you recently changed tensorflow versions

@suhailsaqan
Copy link

@gadagashwini I have the same problem.. I'm using Tensorflow 1.14.0 and python 3.7

restart kernel it worked for me.

@rakshitks
Copy link

I changed the version of python to 3.7 from 3.6 it worked

@kewlcoder
Copy link

  1. Use Tensorflow 1.11 or greater. However, don't go on to use Tensorflow 2.*.
  2. Also, for the current latest version of tensorflow-hub 0.10.0, you need tf >= 1.15.0.
    Thus, best to use 1.15.0 <= tf < 2.* along with tf-hub latest(0.10.0).

@Smiril
Copy link

Smiril commented Jul 11, 2022

same error on macOS : 12.+ TensorFlow : 2.9.2 tensorboard : 2.9.1 python : 3.9 tensorflow-hub 0.10.0

Traceback (most recent call last): File "/Users/Smiril/Documents/deep/SimSwap/m1_tf_test_one_image.py", line 12, in <module> import tensorflow.contrib.eager as tfe File "/Users/Smiril/opt/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/contrib/__init__.py", line 38, in <module> from tensorflow.contrib import cloud File "/Users/Smiril/opt/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/contrib/cloud/__init__.py", line 24, in <module> from tensorflow.contrib.cloud.python.ops.bigquery_reader_ops import * File "/Users/Smiril/opt/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/contrib/cloud/python/ops/bigquery_reader_ops.py", line 21, in <module> from tensorflow.contrib.cloud.python.ops import gen_bigquery_reader_ops File "/Users/Smiril/opt/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/contrib/cloud/python/ops/gen_bigquery_reader_ops.py", line 307, in <module> _op_def_lib = _InitOpDefLibrary(b"\n\355\001\n\016BigQueryReader\032\024\n\rreader_handle\030\007\200\001\001\"\027\n\tcontainer\022\006string\032\002\022\000\"\031\n\013shared_name\022\006string\032\002\022\000\"\024\n\nproject_id\022\006string\"\024\n\ndataset_id\022\006string\"\022\n\010table_id\022\006string\"\027\n\007columns\022\014list(string)\"\027\n\020timestamp_millis\022\003int\"\034\n\016test_end_point\022\006string\032\002\022\000\210\001\001\n\331\001\n GenerateBigQueryReaderPartitions\032\016\n\npartitions\030\007\"\024\n\nproject_id\022\006string\"\024\n\ndataset_id\022\006string\"\022\n\010table_id\022\006string\"\027\n\007columns\022\014list(string)\"\027\n\020timestamp_millis\022\003int\"\025\n\016num_partitions\022\003int\"\034\n\016test_end_point\022\006string\032\002\022\000") File "/Users/Smiril/opt/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/contrib/cloud/python/ops/gen_bigquery_reader_ops.py", line 215, in _InitOpDefLibrary _op_def_registry.register_op_list(op_list) AttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'register_op_list'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:model Model related issues stat:awaiting response Status - Awaiting response from author TF 2.0 Issues relating to TensorFlow 2.0 type:support Support issues
Projects
None yet
Development

No branches or pull requests