mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-04 01:42:15 +08:00
Merge remote-tracking branch 'main/0.5.0' into 0.5.0
Former-commit-id: 13e8e0b2c2054acf814ead064d36e39f037fa06a
This commit is contained in:
commit
081354cf34
@ -1,6 +1,6 @@
|
||||
# Contributing to Milvus
|
||||
|
||||
First of all, thanks for taking the time to contribute to Milvus! It's people like you that help Milvus come to fruition.
|
||||
First of all, thanks for taking the time to contribute to Milvus! It's people like you that help Milvus come to fruition. :tada:
|
||||
|
||||
The following are a set of guidelines for contributing to Milvus. Following these guidelines helps contributing to this project easy and transparent. These are mostly guideline, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
|
||||
|
||||
@ -11,8 +11,8 @@ As for everything else in the project, the contributions to Milvus are governed
|
||||
Before you make any contributions, make sure you follow this list.
|
||||
|
||||
- Read [Contributing to Milvus](CONTRIBUTING.md).
|
||||
- Check if the changes are consistent with the [coding style](CONTRIBUTING.md#coding-style).
|
||||
- Run [unit tests](CONTRIBUTING.md#run-unit-test).
|
||||
- Check if the changes are consistent with the [coding style](CONTRIBUTING.md#coding-style), and format your code accordingly.
|
||||
- Run [unit tests](CONTRIBUTING.md#run-unit-test-with-code-coverage) and check your code coverage rate.
|
||||
|
||||
## What contributions can I make?
|
||||
|
||||
@ -68,15 +68,51 @@ And we made the following changes based on the guide:
|
||||
- 120-character line length
|
||||
- Camel-Cased file names
|
||||
|
||||
### Format code
|
||||
|
||||
## Run unit test
|
||||
|
||||
We use Google Test framework for test running.
|
||||
To run unit test for Milvus under C++, please use the following command:
|
||||
|
||||
Install clang-format
|
||||
```shell
|
||||
# Run unit test for Milvus
|
||||
$ ./build.sh -u
|
||||
$ sudo apt-get install clang-format
|
||||
$ rm cmake_build/CMakeCache.txt
|
||||
```
|
||||
Check code style
|
||||
```shell
|
||||
$ ./build.sh -l
|
||||
```
|
||||
To format the code
|
||||
```shell
|
||||
$ cd cmake_build
|
||||
$ make clang-format
|
||||
```
|
||||
|
||||
## Run unit test with code coverage
|
||||
|
||||
Before submitting your PR, make sure you have run unit test, and your code coverage rate is >= 90%.
|
||||
|
||||
Install lcov
|
||||
```shell
|
||||
$ sudo apt-get install lcov
|
||||
```
|
||||
Run unit test and generate code for code coverage check
|
||||
```shell
|
||||
$ ./build.sh -u -c
|
||||
```
|
||||
|
||||
Run MySQL docker
|
||||
```shell
|
||||
docker pull mysql:latest
|
||||
docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest
|
||||
```
|
||||
|
||||
Run code coverage
|
||||
|
||||
```shell
|
||||
$ ./coverage.sh -u root -p 123456 -t 127.0.0.1
|
||||
```
|
||||
|
||||
Or start your own MySQL server, and then run code coverage
|
||||
|
||||
```shell
|
||||
$ ./coverage.sh -u ${MYSQL_USERNAME} -p ${MYSQL_PASSWORD} -t ${MYSQL_SERVER_IP}
|
||||
```
|
||||
|
||||
|
||||
78
README.md
78
README.md
@ -1,19 +1,23 @@
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
- [Slack Community](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk)
|
||||
- [Twitter](https://twitter.com/milvusio)
|
||||
- [Blog](https://www.milvus.io/blog/)
|
||||
- [Twitter](https://twitter.com/milvus_io)
|
||||
- [CSDN](https://zilliz.blog.csdn.net/)
|
||||
- [中文官网](https://www.milvus.io/zh-CN/)
|
||||
|
||||
|
||||
# Welcome to Milvus
|
||||
|
||||
Firstly, welcome, and thanks for your interest in [Milvus](https://milvus.io)! No matter who you are, what you do, we greatly appreciate your contribution to help us reinvent data science with Milvus.
|
||||
Firstly, welcome, and thanks for your interest in [Milvus](https://milvus.io)! No matter who you are, what you do, we greatly appreciate your contribution to help us reinvent data science with Milvus.
|
||||
|
||||
## What is Milvus
|
||||
|
||||
Milvus is an open source vector search engine that supports similarity search of large-scale vectors. Built on optimized indexing algorithm, it is compatible with major AI/ML models.
|
||||
|
||||
Milvus was developed by ZILLIZ, a tech startup that intends to reinvent data science, with the purpose of providing enterprises with efficient and scalable similarity search and analysis of feature vectors and unstructured data.
|
||||
|
||||
Milvus provides stable Python, C++ and Java APIs.
|
||||
|
||||
Keep up-to-date with newest releases and latest updates by reading Milvus [release notes](https://milvus.io/docs/en/Releases/v0.4.0/).
|
||||
@ -24,14 +28,14 @@ Keep up-to-date with newest releases and latest updates by reading Milvus [relea
|
||||
|
||||
- Intelligent index
|
||||
|
||||
With a “Decide Your Own Algorithm” approach, you can embed machine learning and advanced algorithms into Milvus without the headache of complex data engineering or migrating data between disparate systems. Milvus is built on optimized indexing algorithm based on quantization indexing, tree-based and graph indexing methods.
|
||||
With a "Decide Your Own Algorithm" approach, you can embed machine learning and advanced algorithms into Milvus without the headache of complex data engineering or migrating data between disparate systems. Milvus is built on optimized indexing algorithm based on quantization indexing, tree-based and graph indexing methods.
|
||||
|
||||
- Strong scalability
|
||||
|
||||
The data is stored and computed on a distributed architecture. This lets you scale data sizes up and down without redesigning the system.
|
||||
|
||||
## Architecture
|
||||

|
||||

|
||||
|
||||
## Get started
|
||||
|
||||
@ -68,55 +72,6 @@ $ ./build.sh -t Release
|
||||
|
||||
When the build is completed, all the stuff that you need in order to run Milvus will be installed under `[Milvus root path]/core/milvus`.
|
||||
|
||||
#### Code format and linting
|
||||
|
||||
Install clang-format
|
||||
```shell
|
||||
$ sudo apt-get install clang-format
|
||||
$ rm cmake_build/CMakeCache.txt
|
||||
```
|
||||
Check code style
|
||||
```shell
|
||||
$ ./build.sh -l
|
||||
```
|
||||
To format the code
|
||||
```shell
|
||||
$ cd cmake_build
|
||||
$ make clang-format
|
||||
```
|
||||
|
||||
#### Run unit test
|
||||
|
||||
```shell
|
||||
$ ./build.sh -u
|
||||
```
|
||||
|
||||
#### Run code coverage
|
||||
|
||||
Install lcov
|
||||
```shell
|
||||
$ sudo apt-get install lcov
|
||||
```
|
||||
```shell
|
||||
$ ./build.sh -u -c
|
||||
```
|
||||
Run MySQL docker
|
||||
```shell
|
||||
docker pull mysql:latest
|
||||
docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest
|
||||
```
|
||||
Run code coverage
|
||||
|
||||
```shell
|
||||
$ ./coverage.sh -u root -p 123456 -t 127.0.0.1
|
||||
```
|
||||
|
||||
Or start your own MySQL server, and then run code coverage
|
||||
|
||||
```shell
|
||||
$ ./coverage.sh -u ${MYSQL_USERNAME} -p ${MYSQL_PASSWORD} -t ${MYSQL_SERVER_IP}
|
||||
```
|
||||
|
||||
#### Launch Milvus server
|
||||
|
||||
```shell
|
||||
@ -174,11 +129,16 @@ $ python3 example.py
|
||||
$ ./sdk_simple
|
||||
```
|
||||
|
||||
#### Run Java example code
|
||||
Make sure Java 8 or higher is already installed.
|
||||
|
||||
Refer to [this link](https://github.com/milvus-io/milvus-sdk-java/tree/master/examples) for the example code.
|
||||
|
||||
## Contribution guidelines
|
||||
|
||||
Contributions are welcomed and greatly appreciated. If you want to contribute to Milvus, please read our [contribution guidelines](CONTRIBUTING.md). This project adheres to the [code of conduct](CODE_OF_CONDUCT.md) of Milvus. By participating, you are expected to uphold this code.
|
||||
|
||||
We use [GitHub issues](https://github.com/milvus-io/milvus/issues/new) to track issues and bugs. For general questions and public discussions, please join our community.
|
||||
We use [GitHub issues](https://github.com/milvus-io/milvus/issues/new/choose) to track issues and bugs. For general questions and public discussions, please join our community.
|
||||
|
||||
## Join the Milvus community
|
||||
|
||||
@ -194,9 +154,11 @@ Please read our [roadmap](https://milvus.io/docs/en/roadmap/) to learn about upc
|
||||
|
||||
[Milvus docs](https://www.milvus.io/docs/en/userguide/install_milvus/)
|
||||
|
||||
[Milvus bootcamp](https://github.com/milvus-io/bootcamp)
|
||||
|
||||
[Milvus blog](https://www.milvus.io/blog/)
|
||||
|
||||
[Milvus CSDN](https://mp.csdn.net/mdeditor/100041006#)
|
||||
[Milvus CSDN](https://zilliz.blog.csdn.net/)
|
||||
|
||||
[Milvus roadmap](https://milvus.io/docs/en/roadmap/)
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ container('milvus-build-env') {
|
||||
&& export JFROG_USER_NAME='${USERNAME}' \
|
||||
&& export JFROG_PASSWORD='${PASSWORD}' \
|
||||
&& export FAISS_URL='http://192.168.1.105:6060/jinhai/faiss/-/archive/branch-0.2.1/faiss-branch-0.2.1.tar.gz' \
|
||||
&& ./build.sh -t ${params.BUILD_TYPE} -j -u -c"
|
||||
&& ./build.sh -t ${params.BUILD_TYPE} -d /opt/milvus -j -u -c"
|
||||
|
||||
sh "./coverage.sh -u root -p 123456 -t 192.168.1.194"
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ container('milvus-build-env') {
|
||||
&& export JFROG_USER_NAME='${USERNAME}' \
|
||||
&& export JFROG_PASSWORD='${PASSWORD}' \
|
||||
&& export FAISS_URL='http://192.168.1.105:6060/jinhai/faiss/-/archive/branch-0.2.1/faiss-branch-0.2.1.tar.gz' \
|
||||
&& ./build.sh -t ${params.BUILD_TYPE} -j"
|
||||
&& ./build.sh -t ${params.BUILD_TYPE} -j -d /opt/milvus"
|
||||
}
|
||||
}
|
||||
} catch (exc) {
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
BUILD_OUTPUT_DIR="cmake_build"
|
||||
BUILD_TYPE="Debug"
|
||||
BUILD_UNITTEST="OFF"
|
||||
INSTALL_PREFIX=$(pwd)/milvus
|
||||
MAKE_CLEAN="OFF"
|
||||
BUILD_COVERAGE="OFF"
|
||||
DB_PATH="/opt/milvus"
|
||||
DB_PATH="/tmp/milvus"
|
||||
PROFILING="OFF"
|
||||
USE_JFROG_CACHE="OFF"
|
||||
RUN_CPPLINT="OFF"
|
||||
@ -40,8 +41,8 @@ do
|
||||
RUN_CPPLINT="ON"
|
||||
;;
|
||||
r)
|
||||
if [[ -d cmake_build ]]; then
|
||||
rm ./cmake_build -r
|
||||
if [[ -d ${BUILD_OUTPUT_DIR} ]]; then
|
||||
rm ./${BUILD_OUTPUT_DIR} -r
|
||||
MAKE_CLEAN="ON"
|
||||
fi
|
||||
;;
|
||||
@ -62,7 +63,7 @@ do
|
||||
|
||||
parameter:
|
||||
-p: install prefix(default: $(pwd)/milvus)
|
||||
-d: db path(default: /opt/milvus)
|
||||
-d: db data path(default: /tmp/milvus)
|
||||
-t: build type(default: Debug)
|
||||
-u: building unit test options(default: OFF)
|
||||
-l: run cpplint, clang-format and clang-tidy(default: OFF)
|
||||
@ -84,11 +85,11 @@ usage:
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ ! -d cmake_build ]]; then
|
||||
mkdir cmake_build
|
||||
if [[ ! -d ${BUILD_OUTPUT_DIR} ]]; then
|
||||
mkdir ${BUILD_OUTPUT_DIR}
|
||||
fi
|
||||
|
||||
cd cmake_build
|
||||
cd ${BUILD_OUTPUT_DIR}
|
||||
|
||||
CMAKE_CMD="cmake \
|
||||
-DBUILD_UNIT_TEST=${BUILD_UNITTEST} \
|
||||
@ -114,6 +115,7 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
|
||||
make lint
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR! cpplint check failed"
|
||||
rm -f CMakeCache.txt
|
||||
exit 1
|
||||
fi
|
||||
echo "cpplint check passed!"
|
||||
@ -122,6 +124,7 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
|
||||
make check-clang-format
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR! clang-format check failed"
|
||||
rm -f CMakeCache.txt
|
||||
exit 1
|
||||
fi
|
||||
echo "clang-format check passed!"
|
||||
@ -130,9 +133,12 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
|
||||
# make check-clang-tidy
|
||||
# if [ $? -ne 0 ]; then
|
||||
# echo "ERROR! clang-tidy check failed"
|
||||
# rm -f CMakeCache.txt
|
||||
# exit 1
|
||||
# fi
|
||||
# echo "clang-tidy check passed!"
|
||||
|
||||
rm -f CMakeCache.txt
|
||||
else
|
||||
# compile and build
|
||||
make -j 4 || exit 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user