If there is no data in the dump, the annoy indexer crashes.
Please chose a more user friendly solution:
Either do:
an empty initialization including a warning
or throw a meaningful exception
logs:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/jina/peapods/runtimes/request_handlers/data_request_handler.py", line 85, in _load_executor
runtime_args=vars(self.args),
File "/usr/local/lib/python3.7/site-packages/jina/jaml/__init__.py", line 556, in load_config
return JAML.load(tag_yml, substitute=False)
File "/usr/local/lib/python3.7/site-packages/jina/jaml/__init__.py", line 90, in load
r = yaml.load(stream, Loader=JinaLoader)
File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data
return self.construct_document(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/local/lib/python3.7/site-packages/jina/jaml/__init__.py", line 427, in _from_yaml
return get_parser(cls, version=data.get('version', None)).parse(cls, data)
File "/usr/local/lib/python3.7/site-packages/jina/jaml/parsers/executor/legacy.py", line 73, in parse
runtime_args=data.get('runtime_args', {}),
File "/workspace/annoy_searcher.py", line 59, in __init__
num_dim = self._vecs.shape[1]
If there is no data in the dump, the annoy indexer crashes.
Please chose a more user friendly solution: Either do:
logs: