object detection: gcloud job fails because tensorflow's version is older on cloud. How can this be fixed? [awaiting tensorflower]
Describe the problem
Trying to run pet example in gcloud. job fails because the version tf in cloud is older (1.0.1 perhaps). How can this be fixed?
Source code / logs
worker-replica-0
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/train.py", line 163, in
I am also facing the same situation.
Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version. Also, did you compile from source or install a binary? Make sure you also include the exact command if possible to produce the output included in your test case. If you are unclear what to include see the issue template displayed in the Github new issue template.
We ask for this in the issue submission template, because it is really difficult to help without that information. Thanks!
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Stock example of pet dataset
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Ubuntu 16.04
- TensorFlow installed from (source or binary):binary
- TensorFlow version (use command below): tensorflow-gpu (1.4.0) 'pip install'
- Python version: 2.7.12
- Bazel version (if compiling from source): N/A
- GCC/Compiler version (if compiling from source): N/A
- CUDA/cuDNN version: 8.0
- GPU model and memory:K80 11.4 GBs Command:
gcloud ml-engine jobs submit training `whoami`_object_detection_`date +%s` \
--job-dir=gs://${YOUR_GCS_BUCKET}/train \
--packages dist/object_detection-0.1.tar.gz,slim/dist/slim-0.1.tar.gz \
--module-name object_detection.train \
--region us-central1 \
--config object_detection/samples/cloud/cloud.yml \
-- \
--train_dir=gs://${YOUR_GCS_BUCKET}/train \
--pipeline_config_path=gs://${YOUR_GCS_BUCKET}/data/faster_rcnn_resnet101_pets.config
(The above command is from https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_pets.md)
I made my way through by changing tf.train.get_or_create_global_step() to tf.contrib.framework get_or_create_global_step() at line 103 in object_detection/builders/optimizer_builder.py.
Ideally I want servers on gcloud to have latest tf version. I am not sure if the current stack is compatible with version deployed by default on gcloud.
The gcloud ml-engine jobs submit training command supports a --runtime-version flag. Does setting that make a difference?
No I couldnt make it work, I added the flag to above command and got this in error:
ERROR: (gcloud.ml-engine.jobs.submit.training) INVALID_ARGUMENT: Field: runtime_version Error: The specified runtime version '1.4.0' is not supported.
- '@type': type.googleapis.com/google.rpc.BadRequest
fieldViolations:
- description: The specified runtime version '1.4.0' is not supported.
field: runtime_version
This looks like an issue for GCloud -- try contacting the gcloud support team.
In the meantime, you can install an older version of tensorflow while you're doing the pets tutorial. With pip, for instance, use e.g. pip install tensorflow==1.3.
@smarzban . It has to be tf.contrib.framework.get_or_create_global_step()
The . between framework and get caused an error when copy pasting from here.