Reputation: 31
I am trying to train an object detector using TensorFlow following the following tutorial: https://cloud.google.com/blog/products/gcp/training-an-object-detector-using-cloud-machine-learning-engine
The tutorial asks to use object_detection.train
, however this has been moved to legacy so I've used object_detection.model_main
instead. Line 21 of this python file calls the module absl
, however this causes the following error (from the GCP Logs Viewer).
Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/root/.local/lib/python2.7/site-packages/object_detection/model_main.py", line 21, in from absl import flags ImportError: No module named absl
I tried to include absl>=0.1
in the required packages section of the setup.py
file for the object_detection package but that didn't work. Next I tried to move my absl folder into the models/research/object_detection
directory before packaging and starting the job, but that didn't work either. How do I fix this? I'm very new to Tensorflow and the GCP platform so your help will be appreciated. Thanks.
Upvotes: 3
Views: 2528
Reputation: 997
The package that you should be adding to REQUIRED_PACKAGES
list in setup.py is 'absl-py>=0.1.0'
. Apart from that, download this package tar.gz file to models/research/dist
. Install by running pip install absl-py
. Then, when starting the job add dist/avsl-0.4.0.tar.gz
to the variables passed to the --packages
flag.
Upvotes: 2