Error on validating model config in model_builder.py
I tried to train object detection with my own data, can run locally without any issue, i followed tutorial to deploy on Google Cloud, I always get same. All my buckets are same regional. ssd_mobilenet_cocov2.txt
Training input
{
"scaleTier": "CUSTOM",
"masterType": "standard_gpu",
"workerType": "standard_gpu",
"parameterServerType": "standard",
"workerCount": "5",
"parameterServerCount": "3",
"packageUris": [
"gs://mv_regional/train_checkpoint/packages/524cd800eacdfbca89a487dc1bb1501482b9d14481e814be2c0fbcc9a0fd031a/object_detection-0.1.tar.gz",
"gs://mv_regional/train_checkpoint/packages/524cd800eacdfbca89a487dc1bb1501482b9d14481e814be2c0fbcc9a0fd031a/slim-0.1.tar.gz"
],
"pythonModule": "object_detection.train",
"args": [
"--train_dir=gs://mv_regional/train_checkpoint/train",
"--pipeline_config_path=gs://mv_regional/ssd_mobilenet_cocov2.config"
],
"region": "us-central1",
"runtimeVersion": "1.0",
"jobDir": "gs://mv_regional/train_checkpoint/"
}
Error message
The replica master 0 exited with a non-zero status of 1. Termination reason: Error. 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 198, in
I commented out following lines in builder/model_builder.py #if not isinstance(model_config, model_pb2.DetectionModel): #raise ValueError('model_config not of type model_pb2.DetectionModel.')
and builder/input_reader.py #if not isinstance(input_reader_config, input_reader_pb2.InputReader): #raise ValueError('input_reader_config not of type ' #'input_reader_pb2.InputReader.')
then the problem disappears and can train on cloud. I have know idea, why validate isinstance.
@balajiravichandiran Would you please make the logs publicly viewable?
I can't export Cloud ML logs, so simulated error on my local. I also attached, object_detection package i tested, hope you can reproduce error from my package.
@balajiravichandiran When running locally did you managed to run the evaluation script ? My one is not working
yes, I am able to run evaluation on locally, as well as cloud.
python eval.py --logtostderr
--checkpoint_dir=/your-checkpoint-dir
--eval_dir=/dir-to-save-eval
--pipeline_config_path=/your-config/pipleine.conf
Did you use TF version 1.3 ?
My evaluation job is not working locally. This is my screen when I run this. I did same as you said

I don't have such warning. yes: tensorflow: '1.3.0' and Python 2.7.6
I did the same. Store training logs in one folder .What has happened ?
@tombstone or @derekjchow might have some ideas here.
Here's the contents of log.txt linked earlier in this issue:
(test)balaji@moovita:~/develop/git/tensor_cloud/test/src/object_detection-0.1$ python -m "object_detection.train" --train_dir=/media/balaji/data/tf_coco_13/train --pipeline_config_path=/media/balaji/data/tf_coco_13/ssd_mobilenet_coco17.pbtxt
/home/balaji/develop/git/tensor_cloud/test/local/lib/python2.7/site-packages/pkg_resources.py:991: UserWarning: /home/balaji/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
/media/balaji/data/tf_coco_13/ssd_mobilenet_coco17.pbtxt /media/balaji/data/tf_coco_13/train
DEBUG print type of model config: <class 'object_detection.protos.model_pb2.DetectionModel'> <class 'google.protobuf.pyext.cpp_message.GeneratedProtocolMessageType'>
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 "/home/balaji/develop/git/tensor_cloud/test/src/object_detection-0.1/object_detection/train.py", line 199, in <module>
tf.app.run()
File "/home/balaji/develop/git/tensor_cloud/test/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/home/balaji/develop/git/tensor_cloud/test/src/object_detection-0.1/object_detection/train.py", line 195, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "object_detection/object_detection/trainer.py", line 159, in train
detection_model = create_model_fn()
File "object_detection/object_detection/builders/model_builder.py", line 73, in build
raise ValueError('model_config not of type model_pb2.DetectionModel.')
ValueError: model_config not of type model_pb2.DetectionModel.
(test)balaji@moovita:~/develop/git/tensor_cloud/test/src/object_detection-0.1$
In my computer,I did these and fixed this problem in model_builder.py don't use "from protos import model_pb2" use "from object_detection.protos import model_pb2" instead
Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.