zilliztech/akcio

Trouble setting up the service

victorhuzhening opened this issue · 6 comments

Each time I try running python main.py --towhee it gives me this error:

Traceback (most recent call last):
File "C:\Users\victo\AppData\Local\Programs\Python\Python311\Lib\site-packages\pymilvus\client\grpc_handler.py", line 119, in _wait_for_channel_ready
grpc.channel_ready_future(self._channel).result(timeout=timeout)
File "C:\Users\victo\AppData\Local\Programs\Python\Python311\Lib\site-packages\grpc_utilities.py", line 151, in result
self._block(timeout)
File "C:\Users\victo\AppData\Local\Programs\Python\Python311\Lib\site-packages\grpc_utilities.py", line 97, in _block
raise grpc.FutureTimeoutError()
grpc.FutureTimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\victo\Documents\CODE FOLDER\Protected Akcio\akcio\main.py", line 24, in
from src_towhee.operations import chat, insert, drop # pylint: disable=C0413
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\victo\Documents\CODE FOLDER\Protected Akcio\akcio\src_towhee\operations.py", line 14, in
towhee_pipelines = TowheePipelines()
^^^^^^^^^^^^^^^^^
File "C:\Users\victo\Documents\CODE FOLDER\Protected Akcio\akcio\src_towhee\pipelines_init_.py", line 51, in init
connections.connect(
File "C:\Users\victo\AppData\Local\Programs\Python\Python311\Lib\site-packages\pymilvus\orm\connections.py", line 349, in connect
connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
File "C:\Users\victo\AppData\Local\Programs\Python\Python311\Lib\site-packages\pymilvus\orm\connections.py", line 282, in connect_milvus
gh._wait_for_channel_ready(timeout=timeout)
File "C:\Users\victo\AppData\Local\Programs\Python\Python311\Lib\site-packages\pymilvus\client\grpc_handler.py", line 123, in _wait_for_channel_ready
raise MilvusException(Status.CONNECT_FAILED,
pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on in01-9434ec54c12222e.gcp-us-west1.vectordb.zillizcloud.com:443. Timeout)>

Reproduction steps:
I cloned the git repo and ran the dependency installing script. Then I modified the config.py file with my OPENAI API key like so:
'openai': { 'openai_model': 'gpt-3.5-turbo', 'openai_api_key': 'my_key_here', # will use environment value 'OPENAI_API_KEY' if None 'llm_kwargs': { 'temperature': 0.8, # 'max_tokens': 200, } },

I left the embedding code untouched but I downloaded sentence-transformers model multi-qa-mpnet-base-cos-v1 using pip install -U sentence-transformers.

For the vector db, I set up a Zilliz cloud cluster on a standard plan so that it would let me input a user and password. inside the cluster I intialized a collection with IP metrics and 768 dimensions. To set up a connection to this cluster I modified the config.py file with the cluster URI, my username and the corresponding password:
'connection_args': { 'uri': os.getenv('MILVUS_URI', 'my_uri_here;), 'user': os.getenv('MILVUS_USER', 'my_user_here'), 'password': os.getenv('MILVUS_PASSWORD', 'my_password_here'), 'secure': True if os.getenv('MILVUS_SECURE', 'False').lower() == 'true' else False },

The memory db was set up using postgresql through pgAdmin 4. I simply set up a database with default owner and all other properties, then connected to it by modifying the config.py file with the instructed string {database_type}://{user}:{password}@{host}/{database_name}, my string looked like: postgresql://{user}:{password}@localhost:5432/{database_name}.

Everything else was left as is. Running the LangChain option gives me a link to localhost:8900, but the link produces an empty page.

jaelgu commented

@victorhuzhening Can you try the following lines in python:

from pymilvus import connections, utility

connections.connect(uri='zilliz_endpoint', user='user_name', password='password_here', secure=True)
utility.list_collections()

The above code just makes sure that you are able to access the Zilliz Cloud service.

Also, to check fastapi service in browser, you should visit https://localhost:8900/docs instead.

@jaelgu So I ran the script with the cluster I set up, and it just returned nothing. No errors though. There actually is one collection in my cluster on Zilliz, but it has no data.

jaelgu commented

@jaelgu So I ran the script with the cluster I set up, and it just returned nothing. No errors though. There actually is one collection in my cluster on Zilliz, but it has no data.

This is weird. It looks like an issue with your Zilliz Cloud. Can you check the status of your Zilliz Cloud instance?

jaelgu commented

@victorhuzhening Hi, I found the solution to fix connection. It will be fixed soon. Can you try again by then?

@jaelgu Oh that's great! I'll try again soon. I just checked my cloud instance and it says it's running.

jaelgu commented

@jaelgu Oh that's great! I'll try again soon. I just checked my cloud instance and it says it's running.

It's fixed. Reopen this ticket if you still have the same problem.