Repository: erikbern/ann-benchmarks
Issue:  Exception: [Milvus] connect to milvus failed: <MilvusException: (code=1, message=this version of sdk is incompatible with server, please downgrade your sdk or upgrade your server)>!!!
Root cause: External Dependency Breakage

Facing the above issue when i run **python run.py --dataset fashion-mnist-784-euclidean --algorithm milvus-ivfpq --runs 1**
using **milvus-cluster-docker-compose.yml**

Can someone help me with the above issue?

> Facing the above issue when i run **python run.py --dataset fashion-mnist-784-euclidean --algorithm milvus-ivfpq --runs 1** using **milvus-cluster-docker-compose.yml**
> 
> Can someone help me with the above issue?

It seems like you're facing a version incompatibility issue between Milvus and pymilvus. You may need to check and ensure that the versions of Milvus and pymilvus are compatible. In the code at this link [ann-benchmarks milvus Dockerfile](https://github.com/erikbern/ann-benchmarks/blob/fcdf494883af33e8c27917019f9d796ccca507ec/ann_benchmarks/algorithms/milvus/Dockerfile#L19C1-L23C129), 
```
RUN pip3 install pymilvus==**2.4.1**
...
RUN wget https://github.com/milvus-io/milvus/releases/download/**v2.4.1**/milvus-standalone-docker-compose.yml -O docker-compose.yml
```
we have already specified the versions of both Milvus and pymilvus to ensure compatibility. This should guarantee that both Milvus and pymilvus are at version 2.4.1. If you still encounter issues, please double-check your setup to ensure everything is configured correctly.


> milvus-cluster-docker-compose.yml

@Mukulareddy `milvus-cluster-docker-compose.yml` seems to have only been updated to version **2.1.4**, which is obviously incompatible with the pymilvus **2.4.1** API in `module.py`.

https://milvus.io/docs/install_standalone-docker-compose.md#Run-Milvus-with-Docker-Compose

https://milvus.io/docs/v2.1.x/install_cluster-docker.md#Install-Milvus-Cluster-with-Docker-Compose

Thank you @cococo2000 . I am able to solve th error by upgrading pymilvus to v2.4.1

@cococo2000 , when i run **python run.py --dataset fashion-mnist-784-euclidean --algorithm milvus-ivfflat --runs 1**
```
2024-06-03 11:11:33,215 - annb - INFO - running only milvus-ivfflat
Traceback (most recent call last):
  File "/home/mukula/may/ann-benchmarks_old/run.py", line 7, in <module>
    main()
  File "/home/mukula/may/ann-benchmarks_old/ann_benchmarks/main.py", line 342, in main
    raise Exception("Nothing to run")
```

I am facing the above error. I checked the issues(https://github.com/erikbern/ann-benchmarks/issues/523) but couldn't find a proper resolution for this issue. 
I have build the docker image using **" python install.py --algorithm milvus"**
Would be grateful if you could help me with this issue.

As per https://github.com/erikbern/ann-benchmarks/issues/523 , the docker image you have shared helped. Please do share it to me as well . My Email id: mukulareddy@gmail.com

> @cococo2000 , when i run **python run.py --dataset fashion-mnist-784-euclidean --algorithm milvus-ivfflat --runs 1**
> 
> ```
> 2024-06-03 11:11:33,215 - annb - INFO - running only milvus-ivfflat
> Traceback (most recent call last):
>   File "/home/mukula/may/ann-benchmarks_old/run.py", line 7, in <module>
>     main()
>   File "/home/mukula/may/ann-benchmarks_old/ann_benchmarks/main.py", line 342, in main
>     raise Exception("Nothing to run")
> ```
> 
> I am facing the above error. I checked the issues(#523) but couldn't find a proper resolution for this issue. I have build the docker image using **" python install.py --algorithm milvus"** Would be grateful if you could help me with this issue.
> 
> As per #523 , the docker image you have shared helped. Please do share it to me as well . My Email id: [mukulareddy@gmail.com](mailto:mukulareddy@gmail.com)

@Mukulareddy you encountered an issue that is different from https://github.com/erikbern/ann-benchmarks/issues/523. Issue https://github.com/erikbern/ann-benchmarks/issues/523 was related to not obtaining the ann-benchmarks-milvus docker image via the `python install.py --algorithm milvus` command. However, it seems you have already generated and obtained this image.

You might need to check if the results directory has already completed the test, or verify that the algorithm parameters you set are not empty as mentioned in the milvus-ivfflat configuration file [here](https://github.com/erikbern/ann-benchmarks/blob/fcdf494883af33e8c27917019f9d796ccca507ec/ann_benchmarks/algorithms/milvus/config.yml#L13C1-L23C45).

If neither of these points resolves the issue, you may need to read through the [source code](https://github.com/erikbern/ann-benchmarks/blob/fcdf494883af33e8c27917019f9d796ccca507ec/ann_benchmarks/main.py#L338C1-L344C45) to identify the specific cause.

Additionally, I have sent the docker image to your email. Please check your inbox for further assistance. I hope this helps!


Thank you so much @cococo2000 for actively helping me.
I will try with the approach you have mentioned.