tensorflow / tensorflow/models

ImportError: cannot import name 'input_reader_pb2' in Google Colab

Open
#7,860 2 comments 0 reactions 3 assignees View on GitHub

@pkulzc is already working on this.

Since Jun 19, 2020.

models:research:odapi type:support
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

System information
  • What is the top-level directory of the model you are using:
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Google Colab
  • TensorFlow installed from (source or binary): However installed in Colab
  • TensorFlow version (use command below): 1.15
  • Bazel version (if compiling from source):
  • CUDA/cuDNN version: 10.0
  • GPU model and memory:Colab GPU
  • Exact command to reproduce: !python3 train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config
Describe the problem

When I run this script on my local machine, I get this error and I am able to fix it with a protobuff compilation and PYTHONPATH export. When I get this exact same error in Colab, the same thing does not fix it. I want to use Colab for the free GPUs.

Source code / logs

Traceback (most recent call last):
File "train.py", line 49, in
from object_detection.builders import dataset_builder
File "/usr/local/lib/python3.6/dist-packages/object_detection/builders/dataset_builder.py", line 27, in
from object_detection.data_decoders import tf_example_decoder
File "/usr/local/lib/python3.6/dist-packages/object_detection/data_decoders/tf_example_decoder.py", line 24, in
from object_detection.protos import input_reader_pb2
ImportError: cannot import name 'input_reader_pb2'

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.