Closed cristianmtr closed 3 years ago
It wasn't a bug. It had something to do with the workspace not being saved at container shutdown, when using it with jinahub+docker
.
Okay. And is there any fix that can be done for that? Since SimpleIndexer will probably be one of the most used executors, we should enable its use in a Docker container
Again, not sure it was an actual bug.
This works
import numpy as np
from jina import Flow, Document
f = Flow().add(
uses='jinahub+docker://SimpleIndexer',
uses_with={'index_file_name': 'name'},
uses_metas={'workspace': '/inner_workspace'},
volumes=['workspace:/inner_workspace']
)
with f:
resp = f.post(
on='/index',
inputs=[Document(id='a', embedding=np.array([1]))],
return_results=True,
)
with f:
resp = f.post(
on='/search',
inputs=[Document(embedding=np.array([1]))],
return_results=True,
parameters={'top_k': 5},
)
assert resp[0].docs[0].matches[0].id == 'a'
Okay, we should then also have a ticket to fix this issue
Okay, we should then also have a ticket to fix this issue
What issue? It works. Might have been fixed in the meantime, if it was a problem
Ah my bad, I thought you were adding the warning.
What is this bug?