Repository: erikbern/ann-benchmarks
Issue: Unable to establish a connection with Milvus without relevant useful information.
Root cause: Documentation Deficiency

Milvus has been installed via Docker, but I am unable to connect to it using ann-benchmark, and there is no useful error message provided.
![图片](https://github.com/erikbern/ann-benchmarks/assets/170313293/6b84b46c-26f2-44d9-a993-b56c8cdb8e87)
![捕获](https://github.com/erikbern/ann-benchmarks/assets/170313293/4fbc6299-3fd5-4feb-8503-202b14a96055)





Milvus is benchmarked using a standalone, non-client/server version (https://github.com/zilliztech/Knowhere). You would have to write a wrapper yourself if you want to test their official release.


Sorry, this was outdated. It seems that @cococo2000 added a lot of new functionality to milvus, and it connects to the db. It should be run using `--algorithm milvus` as far as I can see.

The names of the latest algorithms in milvus can be found in the `ann_benchmarks/algorithms/milvus/config.yml` file, including milvus-flat, milvus-ivfflat, milvus-hnsw, milvus-scann, milvus-ivfpq, and milvus-ivfsq8.

To run a command using one of these algorithms, you could use:
```bash
python run.py --algorithm milvus-flat  --runs 1  --dataset mnist-784-euclidean
``` 
@Kinkisong

Thanks @cococo2000. Is there any reason to not have them tested in github actions? They don't seem to appear in 

https://github.com/erikbern/ann-benchmarks/blob/main/.github/workflows/benchmarks.yml#L44-L49

> Thanks @cococo2000. Is there any reason to not have them tested in github actions? They don't seem to appear in
> 
> https://github.com/erikbern/ann-benchmarks/blob/main/.github/workflows/benchmarks.yml#L44-L49

The Docker tag for all these algorithms is `ann-benchmarks-milvus`, which is why the library includes only the milvus parameter. Additionally, with `--max-n-algorithms 3`, the GitHub Action will run tests on three of these algorithms.

@cococo2000  I still cannot connect to milvus with new command. Is here any wrong with my command? Thanks for your help!
![image](https://github.com/erikbern/ann-benchmarks/assets/32962590/00ff9e6e-d54a-4e40-a31e-232546b47a9b)


> @cococo2000 I still cannot connect to milvus with new command. Is here any wrong with my command? Thanks for your help! ![image](https://private-user-images.githubusercontent.com/32962590/332727718-00ff9e6e-d54a-4e40-a31e-232546b47a9b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTYzNzI5NjEsIm5iZiI6MTcxNjM3MjY2MSwicGF0aCI6Ii8zMjk2MjU5MC8zMzI3Mjc3MTgtMDBmZjllNmUtZDU0YS00ZTQwLWEzMWUtMjMyNTQ2YjQ3YTliLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTIyVDEwMTEwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQyMDg0NjFjNDU1ZmM4YjBjNTQyNWRlYzc5ZTQwMDZkNDNjODUxMTYzMWM5MWI1MjUyOTk4MDJkYWFlOGJlMTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.57n_QBU1iVpMMzCFNggr7l0fB2OoNBlHt4BGYfrK0o8)

It seems that the Docker image ann-benchmarks-milvus was not built using `python install.py .....` before running the benchmark. Running the following command should resolve the issue:
```bash
python install.py --algorithm milvus
```
@GreateFang Let me know if you need any further adjustments!

> > @cococo2000 I still cannot connect to milvus with new command. Is here any wrong with my command? Thanks for your help! ![image](https://private-user-images.githubusercontent.com/32962590/332727718-00ff9e6e-d54a-4e40-a31e-232546b47a9b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTYzNzI5NjEsIm5iZiI6MTcxNjM3MjY2MSwicGF0aCI6Ii8zMjk2MjU5MC8zMzI3Mjc3MTgtMDBmZjllNmUtZDU0YS00ZTQwLWEzMWUtMjMyNTQ2YjQ3YTliLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTIyVDEwMTEwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQyMDg0NjFjNDU1ZmM4YjBjNTQyNWRlYzc5ZTQwMDZkNDNjODUxMTYzMWM5MWI1MjUyOTk4MDJkYWFlOGJlMTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.57n_QBU1iVpMMzCFNggr7l0fB2OoNBlHt4BGYfrK0o8)
> 
> It seems that the Docker image ann-benchmarks-milvus was not built using `python install.py .....` before running the benchmark. Running the following command should resolve the issue:
> 
> ```shell
> python install.py --algorithm milvus
> ```
> 
> @GreateFang Let me know if you need any further adjustments!

I sorry that I have keep tring for a long time to install milvus but I fail. Could you pls provide a docker image that generated by ann to let me test it? thanks a lot @cococo2000  so depressed, working offline limitation make this so hardTT hopefully could get your help! My Email is 1441474899@qq.com

@GreateFang I have sent the image to you via email, I hope it can help you.

> @GreateFang I have sent the image to you via email, I hope it can help you.

Thank you sooooooooooooooooo much!

<img width="991" alt="image" src="https://github.com/erikbern/ann-benchmarks/assets/32962590/11782d77-fc75-4f8a-a1fa-0d6fa762cfd3">
Hi coco @cococo2000 ,I have used your image and it works!Thanks a lot again! Could you help to check If this output is normal? It have stopped outputting for a  while. should I just wait for result? And how long will it usually take( I use angular-25 dataset)?

Sorry for keeping bothering, Thanks a lot for your patiently reply.

> <img alt="image" width="991" src="https://private-user-images.githubusercontent.com/32962590/335926218-11782d77-fc75-4f8a-a1fa-0d6fa762cfd3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc0MjQxNTYsIm5iZiI6MTcxNzQyMzg1NiwicGF0aCI6Ii8zMjk2MjU5MC8zMzU5MjYyMTgtMTE3ODJkNzctZmM3NS00ZjhhLWExZmEtMGQ2ZmE3NjJjZmQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjAzVDE0MTA1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNlMzFmZTdhMmZmNjA3MTYxNThiMDI2YTRmNWQ1N2I2OTE2ZmQ0NDI0NTJkYjVhZGY4ZGI5ZTlmNDZjODk4ODcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.PQ5ROtTUBuHbUq_MBCFH_hihJDtWdCUeOMpTcT95Cxs"> Hi coco @cococo2000 ,I have used your image and it works!Thanks a lot again! Could you help to check If this output is normal? It have stopped outputting for a while. should I just wait for result? And how long will it usually take( I use angular-25 dataset)?
> Sorry for keeping bothering, Thanks a lot for your patiently reply.

@GreateFang It appears that something is not functioning correctly. The program is unable to connect to the Milvus server properly, likely due to a `pthread_create failed: Operation not permitted` error. I did not encounter this issue when testing on Ubuntu, so I suspect the problem might be related to using the CentOS system. Additionally, for the `Operation not permitted` error, you might want to try running the program as root.




@GreateFang You can see the normal milvus test output [here](https://github.com/erikbern/ann-benchmarks/actions/runs/9222726285/job/25374470519)

I have solved this problem with upgrading docker version and docker-compose version. Now it works perfectly, thank you for your help! @cococo2000