Recent Jina update breaks vectordb initialization
turner-anderson opened this issue · 2 comments
turner-anderson commented
The 3.20.0 update on Jina introduced a few new positional arguments to _FunctionWithSchema including 'is_singleton_doc', 'parameters_is_pydantic_model', and 'paramaters_model'. This seems to have broken the initialization of at least the InMemoryExactNNVectorDB and HNSWVectorDB. When trying to create a db the following error message is generated:
TypeError Traceback (most recent call last)
Cell In[3], line 6
3 from vectordb import InMemoryExactNNVectorDB, HNSWVectorDB
5 # Specify your workspace path
----> 6 db = InMemoryExactNNVectorDB[ToyDoc](workspace='./workspace_path')
8 # Index a list of documents with random embeddings
9 doc_list = [ToyDoc(text=f'toy doc {i}', embedding=np.random.rand(128)) for i in range(1000)]
File ~/Documents/projects/git/vc/venv/lib/python3.11/site-packages/vectordb/db/base.py:61, in VectorDB.__init__(self, *args, **kwargs)
59 kwargs['requests'] = REQUESTS_MAP
60 kwargs['runtime_args'] = {'workspace': self._workspace}
---> 61 self._executor = self._executor_cls(*args, **kwargs)
File ~/Documents/projects/git/vc/venv/lib/python3.11/site-packages/jina/serve/executors/decorators.py:61, in avoid_concurrent_lock_cls..avoid_concurrent_lock_wrapper..arg_wrapper(self, *args, **kwargs)
59 return f
60 else:
---> 61 return func(self, *args, **kwargs)
File ~/Documents/projects/git/vc/venv/lib/python3.11/site-packages/jina/serve/helper.py:73, in store_init_kwargs..arg_wrapper(self, *args, **kwargs)
71 self._init_kwargs_dict = tmp
72 convert_tuple_to_list(self._init_kwargs_dict)
---> 73 f = func(self, *args, **kwargs)
74 return f
...
35 else:
36 self._requests[k] = _FunctionWithSchema(self._requests[k].fn, DocList[self._input_schema],
37 DocList[self._output_schema])
TypeError: _FunctionWithSchema.__new__() missing 3 required positional arguments: 'is_singleton_doc', 'parameters_is_pydantic_model', and 'parameters_model'
I fixed temporarily by reverting to Jina 3.19.0
JoanFM commented
Will fix soon
JoanFM commented
Hello @turner-anderson ,
Thank you very much for finding this issue.