Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Milvus2DocumentStore compatible with pymilvus>=2.0.0 #2126

Merged
merged 56 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
5ea553e
update remaining occurences of get_connection
MichelBartels Feb 4, 2022
29aa16e
fix milvus2 import and fix wrong extra references
MichelBartels Feb 4, 2022
9c569fe
Apply Black
github-actions[bot] Feb 4, 2022
df62d25
Retrigger tests
MichelBartels Feb 4, 2022
f80544d
Merge branch 'fix-milvus2' of https://github.com/deepset-ai/haystack …
MichelBartels Feb 4, 2022
ae47bc0
Update documentation
github-actions[bot] Feb 4, 2022
ccc8370
Merge branch 'master' into fix-milvus2
ZanSara Feb 4, 2022
f3cb065
change MilvusDocumentStore to Milvus1DocumentStore
MichelBartels Feb 4, 2022
478fd08
Merge branch 'fix-milvus2' of https://github.com/deepset-ai/haystack …
MichelBartels Feb 4, 2022
31f7819
update milvus docstrings to reflect updated dependency management
MichelBartels Feb 4, 2022
171a69c
Update Documentation & Code Style
github-actions[bot] Feb 4, 2022
b86449a
enable milvus 2 tests
MichelBartels Feb 8, 2022
8449aef
Merge branch 'fix-milvus2' of https://github.com/deepset-ai/haystack …
MichelBartels Feb 8, 2022
ad343ec
fix milvus2 env variable processing
MichelBartels Feb 8, 2022
f9c4a13
fix dropping collections for each milvus 2 test
MichelBartels Feb 8, 2022
c6d57d3
fix typo
MichelBartels Feb 8, 2022
766d78c
fix another typo
MichelBartels Feb 8, 2022
e4df42c
make Milvus 2 doc store tests work
Feb 11, 2022
c897ca8
allow user to specify consistency level
Feb 11, 2022
fed7198
Update Documentation & Code Style
github-actions[bot] Feb 11, 2022
0fabd18
fix type hint
Feb 14, 2022
9af14ae
Merge branch 'fix-milvus2' of https://github.com/deepset-ai/haystack …
Feb 14, 2022
07469e6
fix type hint
Feb 14, 2022
879ba17
fix type hint
Feb 14, 2022
6122902
fix retriever test
Feb 14, 2022
47a5f46
Update Documentation & Code Style
github-actions[bot] Feb 14, 2022
a628ccc
fix type hint
Feb 14, 2022
6514d0c
Merge branch 'fix-milvus2' of https://github.com/deepset-ai/haystack …
Feb 14, 2022
93d2fc7
Update Documentation & Code Style
github-actions[bot] Feb 14, 2022
2517bd1
Merge branch 'master' into fix-milvus2
ZanSara Feb 17, 2022
4fa8434
Fist attempt at running Milvus2 in the CI
ZanSara Feb 17, 2022
dbcc2ca
Update Documentation & Code Style
github-actions[bot] Feb 17, 2022
64a61aa
Fix typo in code-and-docs-check
ZanSara Feb 17, 2022
e5af6a9
Typo in env var
ZanSara Feb 17, 2022
221bc9c
Merge branch 'fix-milvus2' of github.com:deepset-ai/haystack into fix…
ZanSara Feb 17, 2022
4415c45
Install the correct pymilvus
ZanSara Feb 17, 2022
b79ca80
Remove warning
ZanSara Feb 17, 2022
246f236
delete debugging statements
MichelBartels Feb 17, 2022
a9c3aa3
Forgot a '2' in linux ci
ZanSara Feb 21, 2022
e612b26
add batch deletion for milvus2
Feb 21, 2022
a137e13
Update Documentation & Code Style
github-actions[bot] Feb 21, 2022
0d3ccda
change default from milvus 1 to milvus 2
Feb 21, 2022
253ac5b
update launch milvus script for milvus 2
Feb 21, 2022
2011f34
Update Documentation & Code Style
github-actions[bot] Feb 21, 2022
a1da6f8
make milvus2 the default in the docstores extra
ZanSara Feb 22, 2022
fa6ae18
Switch milvus1 and milvus2 in base test run on CI
ZanSara Feb 22, 2022
d4836c1
Merge branch 'fix-milvus2' of github.com:deepset-ai/haystack into fix…
ZanSara Feb 24, 2022
88ed855
Rename docstore flags for pytest: 'milvus'->'milvus1', 'milvus2'->'mi…
ZanSara Feb 24, 2022
6bce535
Fix detail in conftest.py
ZanSara Feb 24, 2022
4d49822
Merge branch 'master' into fix-milvus2
ZanSara Feb 24, 2022
54cb14e
Rename milvus.py->milvus1.py and milvus2x.py->milvus2.py
ZanSara Feb 24, 2022
3a9a063
Merge branch 'fix-milvus2' of github.com:deepset-ai/haystack into fix…
ZanSara Feb 24, 2022
5fdd83b
Enable autogenerated docs for Milvus1 and 2 separately
ZanSara Feb 24, 2022
838d715
Update Documentation & Code Style
github-actions[bot] Feb 24, 2022
7732186
Partial fix to docstring of Milvus2DocumentStore
ZanSara Feb 24, 2022
fa93ba4
Update Documentation & Code Style
github-actions[bot] Feb 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 52 additions & 7 deletions .github/workflows/linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
if [[ `git status --porcelain` ]]; then
git status
echo ""
echo "This means that the `autoformat.yml` action didn't run on the fork."
echo "This means that the 'autoformat.yml' action didn't run."
echo "Please enable GitHub Action on your fork to pass this check!"
exit 1
fi
Expand Down Expand Up @@ -257,7 +257,10 @@ jobs:
run: docker run -d -p 9200:9200 -e "discovery.type=single-node" -e "ES_JAVA_OPTS=-Xms128m -Xmx128m" elasticsearch:7.9.2

- name: Run Milvus
run: docker run -d -p 19530:19530 -p 19121:19121 milvusdb/milvus:1.1.0-cpu-d050721-5e559c
run: |
wget https://github.com/milvus-io/milvus/releases/download/v2.0.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
sudo docker-compose up -d
sudo docker-compose ps

- name: Run Weaviate
run: docker run -d -p 8080:8080 --name haystack_test_weaviate --env AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED='true' --env PERSISTENCE_DATA_PATH='/var/lib/weaviate' semitechnologies/weaviate:1.7.2
Expand All @@ -271,9 +274,6 @@ jobs:
- name: Run Parsr
run: docker run -d -p 3001:3001 axarev/parsr:v1.2.2

# - name: Run Ray
# run: RAY_DISABLE_MEMORY_MONITOR=1 ray start --head

- name: Install pdftotext
run: wget --no-check-certificate https://dl.xpdfreader.com/xpdf-tools-linux-4.03.tar.gz && tar -xvf xpdf-tools-linux-4.03.tar.gz && sudo cp xpdf-tools-linux-4.03/bin64/pdftotext /usr/local/bin

Expand All @@ -290,8 +290,6 @@ jobs:
pip install rest_api/
pip install ui/
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.10.0+cpu.html
echo "=== pip freeze ==="
pip freeze

# Haystack needs to be reinstalled at this stage to make sure the current commit's version is the one getting tested.
# The cache can last way longer than a specific action's run, so older Haystack version could be carried over.
Expand All @@ -303,3 +301,50 @@ jobs:

- name: Run tests
run: pytest -s ${{ matrix.test-path }}


test-milvus1:
needs: build-cache
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Cache Python
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: linux-${{ env.date }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/setup.cfg') }}-${{ hashFiles('**/pyproject.toml') }}

- name: Run Milvus 1
run: docker run -d -p 19530:19530 -p 19121:19121 milvusdb/milvus:1.1.0-cpu-d050721-5e559c

- name: Install pdftotext
run: wget --no-check-certificate https://dl.xpdfreader.com/xpdf-tools-linux-4.03.tar.gz && tar -xvf xpdf-tools-linux-4.03.tar.gz && sudo cp xpdf-tools-linux-4.03/bin64/pdftotext /usr/local/bin

- name: Install Dependencies (on cache miss only)
# The cache might miss during the execution of an action: there should always be a fallback step to
# rebuild it in case it goes missing
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install --upgrade pip
pip install .[test]
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.10.0+cpu.html

# Haystack needs to be reinstalled at this stage to make sure the current commit's version is the one getting tested.
# The cache can last way longer than a specific action's run, so older Haystack version could be carried over.
- name: Reinstall Haystack
run: |
pip install .[test]
pip install .[milvus1]

- name: Run Milvus1 tests
run: |
export MILVUS1_ENABLED=1
pytest -s test/test_document_store.py test/test_eval.py test/test_faiss_and_milvus.py test/test_pipeline.py test/test_retriever.py test/test_standard_pipelines.py --document_store_type="milvus1"
Loading