Skip to content

PYTHON-4522 Add LlamaIndex kvstore test #32

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

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 17 additions & 4 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,31 @@ buildvariants:
tasks:
- name: test-chatgpt-retrieval-plugin

- name: test-llama-index-rhel
display_name: LlamaIndex RHEL
- name: test-llama-index-kvstore-rhel
display_name: LlamaIndex RHEL KV Store
expansions:
DIR: llama-index
DIR: llama-index-python-kvstore
REPO_NAME: llama_index
CLONE_URL: https://github.com/run-llama/llama_index.git
# TODO - Update CLONE_URL: [PYTHON-4522]
CLONE_URL: -b PYTHON-4522 --single-branch https://github.com/shruti-sridhar/llama_index.git
DATABASE: llama_index_test_db
run_on:
- rhel87-small
tasks:
- name: test-llama-index

- name: test-llama-index-vectorstore-rhel
display_name: LlamaIndex RHEL Vector Store
expansions:
DIR: llama-index-python-vectorstore
REPO_NAME: llama_index
CLONE_URL: https://github.com/run-llama/llama_index.git
DATABASE: llama_index_test_db
run_on:
- rhel87-small
tasks:
- name: test-llama-index

- name: test-docarray-rhel
display_name: DocArray RHEL
expansions:
Expand Down
30 changes: 30 additions & 0 deletions llama-index-python-kvstore/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

set -x

. $workdir/src/.evergreen/utils.sh

CONN_STRING=$($atlas deployments connect $DIR --connectWith connectionString)
PYTHON_BINARY=$(find_python3)
$PYTHON_BINARY -c "import sys; print(f'Python version found: {sys.version_info}')"

# cd to the MongoDB integration. It has its own project
cd llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-mongodb

# Install Poetry into base python
$PYTHON_BINARY -m pip install -U pip poetry
# Create a package specific poetry environment
$PYTHON_BINARY -m poetry env use $PYTHON_BINARY
# Activate the poetry env, which itself does not include poetry
source $($PYTHON_BINARY -m poetry env info --path)/bin/activate
# Recreate the poetry lock file
$PYTHON_BINARY -m poetry lock --no-update
# Install from pyproject.toml into package specific environment
$PYTHON_BINARY -m poetry install --with dev

# Run tests. Sensitive variables in Evergreen come from Evergreen project: ai-ml-pipeline-testing/
OPENAI_API_KEY=$openai_api_key \
MONGODB_URI=$CONN_STRING \
MONGODB_DATABASE="llama_index_test_db" \
MONGODB_COLLECTION="llama_index_test_kvstore" \
$PYTHON_BINARY -m poetry run pytest -v tests
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
File renamed without changes.