milvus-lite
milvus-lite copied to clipboard
It doesn't work in notebook
It works when I run this code with python command:
import milvus
milvus.start()
from pymilvus import connections, FieldSchema, CollectionSchema, DataType, Collection, utility
connections.connect(host='127.0.0.1', port='19530')
Collection('hello_milvus').num_entities
But when I run it in notebook will get error:
It seems that milvus is not started, but in cell 1 milvus.start has passed, strangely not printing "---Milvus Proxy successfully initialized and ready to serve!---".
And it's like milvus.start is asynchronous in the notebook, cell 2 will work after minutes.
Can you post the server logs here? (usually at /tmp/e-milvus/logs)
Actually, I have no such directory with #2. Can you reproduce it?
Actually, I have no such directory with #2. Can you reproduce it?
Could be an old version. Can you check /tmp/milvus instead?
From the log it looks like Milvus started successfully. Could be your version does not print that "---Milvus Proxy successfully initialized and ready to serve!---" line.
Try waiting a while (1-2 minutes) before trying to use it
Actually, it sometimes prints "---Milvus Proxy initialized successfully, ready to serve!---". So if I want to run all cells at once, adding time.sleep to my notebook is the only way, which I think is confusing.
Emmm, sometime it takes longer for Milvus to fully startup and print that line. If not, it usually indicate something is wrong during Milvus startup
Emmm, sometime it takes longer for Milvus to fully startup and print that line. If not, it usually indicate something is wrong during Milvus startup
Is there any function that checks if the embedded milvus is started? I added time.sleep(30) to the notebook but it still shows the error, I think it hasn't started successfully yet.
https://github.com/milvus-io/embd-milvus/issues/25 @shiyu22 Give it a try, it might be a good solution