Skip to content

Commit 4edb341

Browse files
committed
Merge branch 'main' of github.com:mongodb-labs/ai-ml-pipeline-testing into INTPYTHON-580
2 parents 4405b70 + 3500d6d commit 4edb341

File tree

21 files changed

+466
-221
lines changed

21 files changed

+466
-221
lines changed

.evergreen/config.yml

Lines changed: 56 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,10 @@ tasks:
119119
- func: "setup remote atlas"
120120
- func: "execute tests"
121121

122-
- name: test-semantic-kernel-csharp-local
122+
- name: test-semantic-kernel-csharp
123123
tags: [local]
124124
commands:
125125
- func: "fetch repo"
126-
- func: "setup local atlas"
127-
- func: "execute tests"
128-
129-
- name: test-semantic-kernel-csharp-remote
130-
tags: [remote]
131-
commands:
132-
- func: "fetch repo"
133-
- func: "setup remote atlas"
134126
- func: "execute tests"
135127

136128
- name: test-langchain-python-local
@@ -264,6 +256,25 @@ tasks:
264256
- func: "fetch repo"
265257
- func: "execute tests"
266258

259+
- name: test-langchain-js-local
260+
tags: [local]
261+
commands:
262+
- func: "fetch repo"
263+
- func: "execute tests"
264+
- command: attach.xunit_results
265+
params:
266+
file: src/langchain-js/langchainjs/libs/langchain-mongodb/results.xml
267+
268+
- name: test-langchain-js-remote
269+
tags: [remote]
270+
commands:
271+
- func: "fetch repo"
272+
- func: "setup remote atlas"
273+
- func: "execute tests"
274+
- command: attach.xunit_results
275+
params:
276+
file: src/langchain-js/langchainjs/libs/langchain-mongodb/results.xml
277+
267278
buildvariants:
268279
- name: test-semantic-kernel-python-rhel
269280
display_name: Semantic-Kernel RHEL Python
@@ -284,8 +295,7 @@ buildvariants:
284295
run_on:
285296
- rhel87-small
286297
tasks:
287-
- name: test-semantic-kernel-csharp-local
288-
- name: test-semantic-kernel-csharp-remote
298+
- name: test-semantic-kernel-csharp
289299
batchtime: 10080 # 1 week
290300

291301
- name: test-langchain-python-rhel
@@ -310,28 +320,30 @@ buildvariants:
310320
- name: test-langgraph-python-remote
311321
batchtime: 10080 # 1 week
312322

313-
- name: test-chatgpt-retrieval-plugin-rhel
314-
display_name: ChatGPT Retrieval Plugin
315-
expansions:
316-
DIR: chatgpt-retrieval-plugin
317-
run_on:
318-
- rhel87-small
319-
tasks:
320-
- name: test-chatgpt-retrieval-plugin-local
321-
- name: test-chatgpt-retrieval-plugin-remote
322-
batchtime: 10080 # 1 week
323-
324-
- name: test-llama-index-vectorstore-rhel
325-
display_name: LlamaIndex RHEL Vector Store
326-
expansions:
327-
DIR: llama-index-python-vectorstore
328-
run_on:
329-
- rhel87-small
330-
tasks:
331-
- name: test-llama-index-local
332-
# TODO: INTPYTHON-440
333-
# - name: test-llama-index-remote
334-
# batchtime: 10080 # 1 week
323+
# TODO: INTPYTHON-668
324+
# - name: test-chatgpt-retrieval-plugin-rhel
325+
# display_name: ChatGPT Retrieval Plugin
326+
# expansions:
327+
# DIR: chatgpt-retrieval-plugin
328+
# run_on:
329+
# - rhel87-small
330+
# tasks:
331+
# - name: test-chatgpt-retrieval-plugin-local
332+
# - name: test-chatgpt-retrieval-plugin-remote
333+
# batchtime: 10080 # 1 week
334+
335+
# TODO: INTPYTHON-669
336+
# - name: test-llama-index-vectorstore-rhel
337+
# display_name: LlamaIndex RHEL Vector Store
338+
# expansions:
339+
# DIR: llama-index-python-vectorstore
340+
# run_on:
341+
# - rhel87-small
342+
# tasks:
343+
# - name: test-llama-index-local
344+
# # TODO: INTPYTHON-440
345+
# # - name: test-llama-index-remote
346+
# # batchtime: 10080 # 1 week
335347

336348
- name: test-docarray-rhel
337349
display_name: DocArray RHEL
@@ -393,3 +405,14 @@ buildvariants:
393405
- ubuntu2204-small
394406
tasks:
395407
- name: test-langchaingo-local
408+
409+
# TODO: INTPYTHON-667
410+
# - name: test-langchain-js-ubuntu
411+
# display_name: LangchainJS Ubuntu2204
412+
# expansions:
413+
# DIR: langchain-js
414+
# run_on:
415+
# - ubuntu2204-small
416+
# tasks:
417+
# - name: test-langchain-js-local
418+
# - name: test-langchain-js-remote

.evergreen/execute-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ set -eu
55
SCRIPT_DIR=$(realpath "$(dirname ${BASH_SOURCE[0]})")
66
ROOT_DIR=$(dirname $SCRIPT_DIR)
77

8-
98
# Source the configuration.
109
cd ${ROOT_DIR}/${DIR}
1110
set -a
1211
source config.env
1312
set +a
1413

1514
cd ${REPO_NAME}
15+
1616
bash ${ROOT_DIR}/${DIR}/run.sh

.evergreen/provision-atlas.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ source secrets-export.sh
1818

1919
# Create the env file
2020
echo "export VOYAGEAI_S3_BUCKET=$VOYAGEAI_S3_BUCKET" >> env.sh
21-
echo "export OPENAI_API_KEY=$OPENAI_API_KEY" >> env.sh
21+
echo "export AZURE_OPENAI_ENDPOINT=$AZURE_OPENAI_ENDPOINT" >> env.sh
22+
echo "export AZURE_OPENAI_API_KEY=$AZURE_OPENAI_API_KEY" >> env.sh
23+
echo "export OPENAI_API_VERSION=$OPENAI_API_VERSION" >> env.sh
2224
echo "export MONGODB_URI=$CONN_STRING" >> env.sh
2325
echo "export VOYAGEAI_API_KEY=$VOYAGEAI_API_KEY" >> env.sh

.evergreen/setup-remote.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ case $DIR in
4444
crewai-tools)
4545
MONGODB_URI=$CREWAI_TOOLS_URI
4646
;;
47+
langchain-js)
48+
MONGODB_URI=$LANGCHAIN_MONGODB_URI
49+
;;
4750
*)
4851
echo "Missing config in setup-remote.sh for DIR: $DIR"
4952
exit 1
@@ -53,9 +56,11 @@ export MONGODB_URI
5356

5457
# Create the env file
5558
echo "export VOYAGEAI_S3_BUCKET=$VOYAGEAI_S3_BUCKET" >> env.sh
56-
echo "export VOYAGEAI_API_KEY=$VOYAGEAI_API_KEY" >> env.sh
57-
echo "export OPENAI_API_KEY=$OPENAI_API_KEY" >> env.sh
59+
echo "export AZURE_OPENAI_ENDPOINT=$AZURE_OPENAI_ENDPOINT" >> env.sh
60+
echo "export AZURE_OPENAI_API_KEY=$AZURE_OPENAI_API_KEY" >> env.sh
61+
echo "export OPENAI_API_VERSION=$OPENAI_API_VERSION" >> env.sh
5862
echo "export MONGODB_URI=$MONGODB_URI" >> env.sh
63+
echo "export VOYAGEAI_API_KEY=$VOYAGEAI_API_KEY" >> env.sh
5964

6065
# Ensure the remote database is populated.
6166
. .evergreen/utils.sh

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Test execution flow is defined in `.evergreen/config.yml`. The test pipeline's c
107107

108108
- `DIR` -- The subdirectory where the tasks will run
109109

110-
- `run_on` -- Specified platform to run on. `rhel87-small` should be used by default. Any other distro may fail Atlas CLI setup.
110+
- `run_on` -- Specified platform to run on. `rhel87-small` or `ubuntu2204-small` should be used by default. Any other distro may fail Atlas CLI setup.
111111
- `tasks` -- Tasks to run. See below for more details
112112
- `cron` -- The tests are run via a cron job on a nightly cadence. This can be modified by setting a different cadence. Cron jobs can be scheduled using [cron syntax](https://crontab.guru/#0_0_*_*_*)
113113

@@ -175,5 +175,18 @@ as they often have to build for a more broad set of scenarios than the original
175175
Rather than making a new branch and modifying a `config.env` file, you can run a patch build as follows:
176176

177177
```bash
178-
evergreen patch -p ai-ml-pipelin-testing --param REPO_ORG="<my-org>" --param REPO_BRANCH="<my-branch>" -y "<my-message>"
178+
evergreen patch -p ai-ml-pipeline-testing --param REPO_ORG="<my-org>" --param REPO_BRANCH="<my-branch>" -y -d "<my-message>"
179179
```
180+
181+
For example
182+
```bash
183+
evergreen patch -p ai-ml-pipeline-testing --param REPO_ORG=caseyclements --param REPO_NAME="langchain-mongodb" --param REPO_BRANCH="INTPYTHON-629" -y -d "Increased retries to 4."
184+
```
185+
186+
### Handling Failing Tests
187+
188+
If tests are found to be failing, and cannot be addressed quickly, the responsible team MUST create a JIRA ticket, and disable the relevant tests
189+
in the `config.yml` file, with a comment about the JIRA ticket that will address it.
190+
191+
This policy will help ensure that a single failing integration does not cause noise in the `dbx-ai-ml-testing-pipeline-notifications` that would mask other
192+
failures.

docarray/run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ set +x
3030

3131
# Run tests. Sensitive variables in Evergreen come from Evergeen project: ai-ml-pipeline-testing/
3232
# shellcheck disable=SC2154
33-
MONGODB_URI="$MONGODB_URI" \
34-
MONGODB_DATABASE="docarray_test_db" \
35-
pytest -v tests/index/mongo_atlas
33+
export MONGODB_URI="$MONGODB_URI"
34+
export MONGODB_DATABASE="docarray_test_db"
35+
pytest -v tests/index/mongo_atlas || pytest --lf

haystack-embeddings/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ PYTHON_BINARY=$(which python)
2222
$PYTHON_BINARY -m pip install -U pip hatch
2323

2424
# Run tests.
25-
MONGO_CONNECTION_STRING="$MONGODB_URI" hatch run test
25+
MONGO_CONNECTION_STRING="$MONGODB_URI" hatch run test:all -v

haystack-fulltext/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ PYTHON_BINARY=$(which python)
2222
$PYTHON_BINARY -m pip install -U pip hatch
2323

2424
# Run tests.
25-
MONGO_CONNECTION_STRING_2="$MONGODB_URI" hatch run test
25+
MONGO_CONNECTION_STRING_2="$MONGODB_URI" hatch run test:all -v

langchain-js/config.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
REPO_NAME=langchainjs
2+
REPO_ORG=langchain-ai
3+
DATABASE=langchain_test_db
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "default",
3+
"type": "search",
4+
"mappings": {
5+
"fields": {
6+
"e": {
7+
"type": "number"
8+
},
9+
"embedding": {
10+
"dimensions": 1536,
11+
"similarity": "euclidean",
12+
"type": "knnVector"
13+
}
14+
}
15+
},
16+
"database": "langchain",
17+
"collectionName": "test"
18+
}

0 commit comments

Comments
 (0)