CV project: unknown exception: OSError('SavedModel file does not exist at: pretrained/{saved_model.pbtxt|saved_model.pb}')
Closed this issue · 1 comments
alexcg1 commented
Describe problem
I'm testing cookiecutter to make sure everything works properly. For:
task_type
:cv
index_type
:files
It throws a lot of errors: log.txt
Notably:
encoder@2545[C]:�[41m�[37munknown exception: OSError('SavedModel file does not exist at: pretrained/{saved_model.pbtxt|saved_model.pb}')�[0m
Traceback (most recent call last):
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/jina/peapods/pea.py", line 331, in run
self.loop_body()
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/jina/peapods/pea.py", line 308, in loop_body
self.load_executor()
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/jina/peapods/pea.py", line 191, in load_executor
self.executor = BaseExecutor.load_config(self.args.yaml_path,
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/jina/executors/__init__.py", line 416, in load_config
return yaml.load(tmp_s)
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/ruamel/yaml/main.py", line 343, in load
return constructor.get_single_data()
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/ruamel/yaml/constructor.py", line 113, in get_single_data
return self.construct_document(node)
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/ruamel/yaml/constructor.py", line 118, in construct_document
data = self.construct_object(node)
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/ruamel/yaml/constructor.py", line 146, in construct_object
data = self.construct_non_recursive_object(node)
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/ruamel/yaml/constructor.py", line 181, in construct_non_recursive_object
data = constructor(self, node)
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/jina/executors/__init__.py", line 457, in from_yaml
return cls._get_instance_from_yaml(constructor, node)[0]
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/jina/executors/__init__.py", line 490, in _get_instance_from_yaml
obj = cls(**data.get('with', {}), metas=data.get('metas', {}), requests=data.get('requests', {}))
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/jina/executors/__init__.py", line 58, in __call__
getattr(obj, '_post_init_wrapper', lambda *x: None)(m, r)
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/jina/executors/__init__.py", line 161, in _post_init_wrapper
self.post_init()
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/jina/executors/encoders/image/bigtransfer.py", line 52, in post_init
_model = tf.saved_model.load(self.model_path)
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/tensorflow/python/saved_model/load.py", line 603, in load
return load_internal(export_dir, tags, options)
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/tensorflow/python/saved_model/load.py", line 614, in load_internal
loader_impl.parse_saved_model_with_debug_info(export_dir))
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/tensorflow/python/saved_model/loader_impl.py", line 56, in parse_saved_model_with_debug_info
saved_model = _parse_saved_model(export_dir)
File "/home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/tensorflow/python/saved_model/loader_impl.py", line 110, in parse_saved_model
raise IOError("SavedModel file does not exist at: %s/{%s|%s}" %
Why do I think it's happening?
- I think there's a line of code missing that downloads the relevant model. I'm guessing the model would depend on what of cv the user is trying to perform, so maybe add another option in
cookiecutter.json
?
Environment
- I've populated
data
with MNIST example files from kaggle - Running inside a virtualenv
- Installed tensorflow manually via
pip
(it wasn't specified inrequirements.txt
, see #10 ) - Otherwise same environment as running nlp tasks with cookiecutter which worked fine
jina --version-full output
:
JINA@3876[E]:�[31mtheses modules or classes can not be imported ['jina.executors.indexers.vector.milvusdb.milvusdbhandler']�[0m
jina 0.4.0
jina-proto 0.0.46
jina-vcs-tag �[33m(unset)�[0m
libzmq 4.3.2
pyzmq 1.19.1
protobuf 3.12.4
proto-backend cpp
grpcio 1.30.0
ruamel.yaml 0.16.10
python 3.8.3
platform Linux
platform-release 5.6.19-2-MANJARO
platform-version #1 SMP PREEMPT Wed Jun 17 22:24:52 UTC 2020
architecture x86_64
processor
jina-resources /home/alexcg/work/jina/code/sandbox/cc-cv/lib/python3.8/site-packages/jina/resources
JINA_ARRAY_QUANT �[33m(unset)�[0m
JINA_CONTRIB_MODULE �[33m(unset)�[0m
JINA_CONTRIB_MODULE_IS_LOADING�[33m(unset)�[0m
JINA_CONTROL_PORT �[33m(unset)�[0m
JINA_DEFAULT_HOST �[33m(unset)�[0m
JINA_EXECUTOR_WORKDIR �[33m(unset)�[0m
JINA_FULL_CLI �[33m(unset)�[0m
JINA_IPC_SOCK_TMP �[33m(unset)�[0m
JINA_LOG_FILE �[33m(unset)�[0m
JINA_LOG_LONG �[33m(unset)�[0m
JINA_LOG_NO_COLOR �[33m(unset)�[0m
JINA_LOG_PROFILING �[33m(unset)�[0m
JINA_LOG_SSE �[33m(unset)�[0m
JINA_LOG_VERBOSITY �[33m(unset)�[0m
JINA_POD_NAME �[33m(unset)�[0m
JINA_PROFILING �[33m(unset)�[0m
JINA_SOCKET_HWM �[33m(unset)�[0m
JINA_STACK_CONFIG �[33m(unset)�[0m
JINA_TEST_CONTAINER �[33m(unset)�[0m
JINA_TEST_GPU �[33m(unset)�[0m
JINA_TEST_PRETRAINED �[33m(unset)�[0m
JINA_VCS_VERSION �[33m(unset)�[0m
JINA_VERSION �[33m(unset)�[0m
JINA_WARN_UNNAMED �[33m(unset)�[0m
JINA_BINARY_DELIMITER �[33m(unset)�[0m
JINA_DISABLE_UVLOOP �[33m(unset)�[0m
alexcg1 commented
I tested today with a Pokemon dataset from Kaggle. This error no longer occurs