Skip to content

Commit 911c07d

Browse files
authored
Merge pull request #10 from VectorInstitute/fix/colab
Fixes Colab issue and updates aieng-rag-utils module
2 parents 359393b + 0efd195 commit 911c07d

14 files changed

+59
-44
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,3 @@ jobs:
4242
user: __token__
4343
password: ${{ secrets.PYPI_API_TOKEN }}
4444
packages-dir: dist/
45-
46-
- name: Create GitHub Release
47-
id: create_release
48-
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
49-
with:
50-
artifacts: "dist/*"
51-
generateReleaseNotes: true

aieng-rag-utils/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "aieng-rag-utils"
3-
version = "0.1.0a1"
3+
version = "1.0.0"
44
description = "Helper modules for AI Engineering RAG Bootcamp reference implementations"
55
authors = [{name = "Vector AI Engineering", email = "[email protected]"}]
66
requires-python = ">=3.10"
@@ -19,11 +19,14 @@ dependencies = [
1919
"llama-index-core>=0.12.37",
2020
"llama-index-llms-huggingface>=0.5.0",
2121
"llama-index-llms-openai-like>=0.1.3",
22+
"llama-index-readers-json>=0.3.0",
2223
"llama-index-readers-s3>=0.4.0",
24+
"llama-index-retrievers-bm25>=0.5.2",
2325
"llama-index-vector-stores-faiss>=0.1.2",
2426
"llama-index-vector-stores-weaviate>=1.3.1",
2527
"langchain-openai>=0.3.8",
2628
"ragas>=0.2.15",
29+
"rapidfuzz>=3.13.0",
2730
"torch==2.1.2",
2831
"weaviate-client==4.9.3",
2932
]

implementations/cloud_search/s3_search_llamaindex.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "214d4de8-3a05-43dd-8a44-82c22570a553",
66
"metadata": {},
77
"source": [
8-
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/uv-migration/implementations/cloud_search/s3_search_llamaindex.ipynb)\n",
8+
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/cloud_search/s3_search_llamaindex.ipynb)\n",
99
"\n",
1010
"# Amazon AWS S3 Search with LlamaIndex"
1111
]
@@ -59,7 +59,9 @@
5959
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
6060
" # This is a Google Colab environment\n",
6161
" # Install required dependencies\n",
62-
" !pip3 install faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss # aieng-rag-utils"
62+
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss aieng-rag-utils\n",
63+
" # Uninstall conflicting dependencies in the Colab environment\n",
64+
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
6365
]
6466
},
6567
{
@@ -694,7 +696,7 @@
694696
],
695697
"metadata": {
696698
"kernelspec": {
697-
"display_name": ".venv",
699+
"display_name": "rag-bootcamp",
698700
"language": "python",
699701
"name": "python3"
700702
},

implementations/document_search/document_search_langchain.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "3d86f6cd",
66
"metadata": {},
77
"source": [
8-
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/document_search/document_search_langchain.ipynb)\n",
8+
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/document_search/document_search_langchain.ipynb)\n",
99
"\n",
1010
"# Document Search with LangChain"
1111
]
@@ -53,7 +53,9 @@
5353
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
5454
" # This is a Google Colab environment\n",
5555
" # Install required dependencies\n",
56-
" !pip3 install faiss-cpu langchain langchain-community langchain-huggingface langchain-openai # aieng-rag-utils"
56+
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu langchain langchain-community langchain-huggingface langchain-openai aieng-rag-utils\n",
57+
" # Uninstall conflicting dependencies in the Colab environment\n",
58+
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
5759
]
5860
},
5961
{
@@ -527,7 +529,7 @@
527529
],
528530
"metadata": {
529531
"kernelspec": {
530-
"display_name": ".venv",
532+
"display_name": "rag-bootcamp",
531533
"language": "python",
532534
"name": "python3"
533535
},

implementations/document_search/document_search_langchain_cohere.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "3d86f6cd",
66
"metadata": {},
77
"source": [
8-
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/document_search/document_search_langchain_cohere.ipynb)\n",
8+
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/document_search/document_search_langchain_cohere.ipynb)\n",
99
"\n",
1010
"# Document Search with LangChain using Cohere"
1111
]
@@ -53,7 +53,9 @@
5353
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
5454
" # This is a Google Colab environment\n",
5555
" # Install required dependencies\n",
56-
" !pip3 install faiss-cpu langchain langchain-community langchain-huggingface langchain-cohere # aieng-rag-utils"
56+
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu langchain langchain-community langchain-huggingface langchain-cohere aieng-rag-utils\n",
57+
" # Uninstall conflicting dependencies in the Colab environment\n",
58+
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
5759
]
5860
},
5961
{
@@ -524,7 +526,7 @@
524526
],
525527
"metadata": {
526528
"kernelspec": {
527-
"display_name": ".venv",
529+
"display_name": "rag-bootcamp",
528530
"language": "python",
529531
"name": "python3"
530532
},

implementations/document_search/document_search_llamaindex.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "3d86f6cd",
66
"metadata": {},
77
"source": [
8-
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/document_search/document_search_llamaindex.ipynb)\n",
8+
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/document_search/document_search_llamaindex.ipynb)\n",
99
"\n",
1010
"# Document Search with LlamaIndex"
1111
]
@@ -53,7 +53,9 @@
5353
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
5454
" # This is a Google Colab environment\n",
5555
" # Install required dependencies\n",
56-
" !pip3 install faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss # aieng-rag-utils"
56+
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss aieng-rag-utils\n",
57+
" # Uninstall conflicting dependencies in the Colab environment\n",
58+
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
5759
]
5860
},
5961
{
@@ -579,7 +581,7 @@
579581
],
580582
"metadata": {
581583
"kernelspec": {
582-
"display_name": ".venv",
584+
"display_name": "rag-bootcamp",
583585
"language": "python",
584586
"name": "python3"
585587
},

implementations/document_search/document_search_llamaindex_cohere.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "3d86f6cd",
66
"metadata": {},
77
"source": [
8-
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/document_search/document_search_llamaindex_cohere.ipynb)\n",
8+
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/document_search/document_search_llamaindex_cohere.ipynb)\n",
99
"\n",
1010
"# Document Search with LlamaIndex using Cohere"
1111
]
@@ -53,7 +53,9 @@
5353
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
5454
" # This is a Google Colab environment\n",
5555
" # Install required dependencies\n",
56-
" !pip3 install faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-cohere llama-index-vector-stores-faiss # aieng-rag-utils"
56+
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-cohere llama-index-vector-stores-faiss aieng-rag-utils\n",
57+
" # Uninstall conflicting dependencies in the Colab environment\n",
58+
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
5759
]
5860
},
5961
{
@@ -575,7 +577,7 @@
575577
],
576578
"metadata": {
577579
"kernelspec": {
578-
"display_name": ".venv",
580+
"display_name": "rag-bootcamp",
579581
"language": "python",
580582
"name": "python3"
581583
},

implementations/pubmed_qa/pubmed_qa_llamaindex.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "2e979eb9-3fe0-49c2-b814-f4025ed81934",
66
"metadata": {},
77
"source": [
8-
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/pubmed_qa/pubmed_qa_llamaindex.ipynb)\n",
8+
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/pubmed_qa/pubmed_qa_llamaindex.ipynb)\n",
99
"\n",
1010
"# PubMed QA using LlamaIndex\n",
1111
"\n",
@@ -54,7 +54,9 @@
5454
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
5555
" # This is a Google Colab environment\n",
5656
" # Install required dependencies\n",
57-
" !pip3 install faiss-cpu langchain llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss # aieng-rag-utils"
57+
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu langchain llama-index llama-index-core llama-index-embeddings-huggingface llama-index-llms-openai-like llama-index-vector-stores-faiss aieng-rag-utils\n",
58+
" # Uninstall conflicting dependencies in the Colab environment\n",
59+
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
5860
]
5961
},
6062
{
@@ -1360,7 +1362,7 @@
13601362
],
13611363
"metadata": {
13621364
"kernelspec": {
1363-
"display_name": "Python 3 (ipykernel)",
1365+
"display_name": "rag-bootcamp",
13641366
"language": "python",
13651367
"name": "python3"
13661368
},

implementations/rag_evaluation/rag_evaluation_basic.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "8f35cfba",
66
"metadata": {},
77
"source": [
8-
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/rag_evaluation/rag_evaluation_basic.ipynb)\n",
8+
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/rag_evaluation/rag_evaluation_basic.ipynb)\n",
99
"\n",
1010
"# RAG Evaluation Basic Demo"
1111
]
@@ -59,7 +59,9 @@
5959
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
6060
" # This is a Google Colab environment\n",
6161
" # Install required dependencies\n",
62-
" !pip3 install faiss-cpu datasets langchain langchain-openai langchain-huggingface ragas # aieng-rag-utils"
62+
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu datasets langchain langchain-openai langchain-huggingface ragas aieng-rag-utils\n",
63+
" # Uninstall conflicting dependencies in the Colab environment\n",
64+
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
6365
]
6466
},
6567
{
@@ -460,7 +462,7 @@
460462
],
461463
"metadata": {
462464
"kernelspec": {
463-
"display_name": ".venv",
465+
"display_name": "rag-bootcamp",
464466
"language": "python",
465467
"name": "python3"
466468
},

implementations/rag_evaluation/rag_evaluation_testset_generation.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "4168e6b6",
66
"metadata": {},
77
"source": [
8-
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/refactor/uv-migration/implementations/rag_evaluation/rag_evaluation_testset_generation.ipynb)\n",
8+
"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VectorInstitute/rag-bootcamp/blob/main/implementations/rag_evaluation/rag_evaluation_testset_generation.ipynb)\n",
99
"\n",
1010
"# RAG Evaluation Test Set Generation\n",
1111
"\n",
@@ -53,7 +53,9 @@
5353
"if \"COLAB_RELEASE_TAG\" in os.environ:\n",
5454
" # This is a Google Colab environment\n",
5555
" # Install required dependencies\n",
56-
" !pip3 install faiss-cpu datasets langchain langchain-community langchain-openai langchain-huggingface ragas==0.1.22 # aieng-rag-utils"
56+
" !pip3 install numpy==1.26.4 torchvision==0.16.2 faiss-cpu datasets langchain langchain-community langchain-openai langchain-huggingface ragas==0.1.22 aieng-rag-utils\n",
57+
" # Uninstall conflicting dependencies in the Colab environment\n",
58+
" !pip3 uninstall --yes torchao torchaudio torchdata torchsummary torchtune"
5759
]
5860
},
5961
{
@@ -1221,7 +1223,7 @@
12211223
],
12221224
"metadata": {
12231225
"kernelspec": {
1224-
"display_name": ".venv",
1226+
"display_name": "rag-bootcamp",
12251227
"language": "python",
12261228
"name": "python3"
12271229
},

0 commit comments

Comments
 (0)