tensorflow / tensorflow/models
tensorflow.python.framework.errors_impl.NotFoundError shows added dollar sign in the path
@pkulzc is already working on this.
Since Jun 24, 2020.
- Dominant language
- Python
- Stars
- 77.7k
- Forks
- 44.8k
- PR merge metrics
- No merged PRs in 30d
Description
I have already posted this question on stackoverflow, below, but it seems to me there is some bug (either in tensorflow object detection, or in Colab):
https://stackoverflow.com/questions/57453317/tensorflow-python-framework-errors-impl-notfounderror-adds-sign
System information
- What is the top-level directory of the model you are using:
object-detection - 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:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04 - TensorFlow installed from (source or binary):
binary - TensorFlow version (use command below):
v1.14.0-0-g87989f6959 1.14.0 - Bazel version (if compiling from source):
n/a - CUDA/cuDNN version:
n/a - GPU model and memory:
Tesla K80, 12GB RAM - Exact command to reproduce:
!python object_detection/model_main.py --pipeline_config_path="/content/gdrive/My Drive/AI/grape4/work/model/ssd_mobilenet_v2_oid_v4.config" --model_dir="/content/gdrive/My Drive/AI/grape4/work/model" --num_train_steps=5000 --num_eval_steps=1000 --alsologtostderr
Describe the problem
The program adds somewhere a leading dollar sign ($) to some file paths. Please see below the output of the Traceback output. Looking at object_detection/utils/config_util.py", line 103 indeed there is a leading dollar sign in the pipeline_config_path variable. And that reproduces the error below. Removing the dollar sign before this step (by using replace("$",""), the error is gone.
I have noticed the same issue later in the execution, as part of the regular output (notice the model_dir also has a leading dollar sign:
I0812 13:49:06.937345 139707814233984 estimator.py:209] Using config: {'_model_dir': '$/content/gdrive/My Drive/AI/grape4/work/model', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 600, '_session_config': allow_soft_placement: true
Source code / logs
Traceback (most recent call last):
File "object_detection/model_main.py", line 109, in <module>
tf.app.run()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "object_detection/model_main.py", line 71, in main
FLAGS.sample_1_of_n_eval_on_train_examples))
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/model_lib.py", line 605, in create_estimator_and_inputs
pipeline_config_path, config_override=config_override)
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/utils/config_util.py", line 103, in get_configs_from_pipeline_file
proto_str = f.read()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/lib/io/file_io.py", line 122, in read
self._preread_check()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/lib/io/file_io.py", line 84, in _preread_check
compat.as_bytes(self.__name), 1024 * 512)
tensorflow.python.framework.errors_impl.NotFoundError: $/content/gdrive/My Drive/AI/grape4/work/model/ssd_mobilenet_v2_oid_v4.config; No such file or directory
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.