Skip to content

Commit

Permalink
Merge branch 'development' into shanepeckham/content-sampling#330
Browse files Browse the repository at this point in the history
  • Loading branch information
shanepeckham authored Mar 13, 2024
2 parents 5220144 + 3a063cb commit ff4d4a4
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 44 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_validation_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout Actions
uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Load all build validation related dependencies
Expand All @@ -31,7 +31,7 @@ jobs:
set -e # fail on error
python -m pip install --upgrade pip
python -m pip install -e . -r requirements.txt -r dev-requirements.txt
- name: Run flake
shell: bash
run: |
Expand All @@ -43,7 +43,7 @@ jobs:
pytest . --cov=. --cov-report=html --cov-config=.coveragerc
- name: Publish Unit Test Results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: unit-test-results
path: "htmlcov/**"
8 changes: 4 additions & 4 deletions .github/workflows/rag_exp_acc_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
AZURE_SEARCH_ADMIN_KEY: ${{ secrets.AZURE_SEARCH_ADMIN_KEY }}
AZURE_SEARCH_SERVICE_ENDPOINT: ${{ secrets.AZURE_SEARCH_SERVICE_ENDPOINT }}
AZURE_LANGUAGE_SERVICE_KEY: ${{ secrets.AZURE_LANGUAGE_SERVICE_KEY }}
AZURE_LANGUAGE_SERVICE_ENDPOINT: ${{ secrets.AZURE_LANGUAGE_SERVICE_ENDPOINT }}
AZURE_LANGUAGE_SERVICE_ENDPOINT: ${{ secrets.AZURE_LANGUAGE_SERVICE_ENDPOINT }}
OPENAI_API_TYPE: "azure"
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_VERSION: ${{ secrets.OPENAI_API_VERSION }}
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Checkout Actions
uses: actions/checkout@v4
- name: Azure login
uses: azure/login@v1
uses: azure/login@v2
with:
creds: ${{ secrets.azure_credentials }}
- name: Configure Azure ML Agent
Expand All @@ -51,11 +51,11 @@ jobs:
- name: execute qna step
shell: bash
run: |
python 02_qa_generation.py
python 02_qa_generation.py
- name: execute querying step
shell: bash
run: |
python 03_querying.py
python 03_querying.py
- name: execute evaluation step
shell: bash
run: |
Expand Down
6 changes: 3 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
promptflow==1.1.1
promptflow-tools==1.0.0
promptflow==1.6.0
promptflow-tools==1.3.0
pytest==8.1.1
pytest-cov==4.1.0
flake8==7.0.0
pre-commit==3.5.0
pre-commit==3.6.2
black==24.2.0
3 changes: 1 addition & 2 deletions rag_experiment_accelerator/embedding/st_embedding_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from requests import HTTPError
from sentence_transformers import SentenceTransformer
from rag_experiment_accelerator.embedding.embedding_model import EmbeddingModel

Expand Down Expand Up @@ -55,7 +54,7 @@ def __init__(self, model_name: str, dimension: int = None, **kwargs) -> None:
super().__init__(name=model_name, dimension=dimension, **kwargs)
try:
self._model = SentenceTransformer(self.name)
except HTTPError as e:
except OSError as e:
logger.error(
f"Error retrieving model: {self.name}. Please check that the model name is correct and that you have an internet connection."
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from unittest.mock import patch
import pytest
import numpy as np
from requests import HTTPError
from rag_experiment_accelerator.embedding.st_embedding_model import STEmbeddingModel


Expand All @@ -18,7 +17,7 @@ def test_generate_embedding(mock_sentence_transformer):


def test_sentence_transformer_embedding_model_raises_non_existing_model():
with pytest.raises(HTTPError):
with pytest.raises(OSError):
STEmbeddingModel("non-existing-model", 123)


Expand Down
61 changes: 31 additions & 30 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
PyPDF2~=2.0
azure-core==1.29.4
matplotlib==3.8.0
plotly==5.18.0
tiktoken==0.5.1
openai==1.3.7
spacy==3.7.2
scikit-learn==1.3.2
pytesseract==0.3.10
azure-ai-ml==1.14.0
azure-ai-textanalytics==5.3.0
azure-core==1.30.1
azure-identity==1.15.0
azure-keyvault-secrets==4.8.*
azure-search-documents==11.4.b11
python-dotenv==1.0.0
PyMuPDF==1.23.5
azure.ai.documentintelligence==1.0.0b2
azureml-mlflow==1.55.0
beautifulsoup4==4.12.3
datasets==2.18.0
docx2txt==0.8
azure-ai-ml==1.11.1
azure-identity==1.14.1
textdistance==4.6.0
azureml-mlflow==1.53.0
fuzzywuzzy==0.18.0
mlflow==2.10.0
rouge-score==0.1.2
hnswlib==0.7.0
pypdf==3.17.0
langchain==0.0.329
langchain-community==0.0.16
sentence-transformers==2.2.2
beautifulsoup4==4.12.2
lxml==4.9.3
unstructured==0.10.26
datasets==2.14.6
evaluate==0.4.1
azure-ai-textanalytics==5.3.0
azure.ai.documentintelligence==1.0.0b1
fuzzywuzzy==0.18.0
hnswlib==0.8.0
langchain==0.1.9
langchain-community==0.0.28
levenshtein==0.25.0
umap-learn==0.5.5
kaleido==0.2.1
azure-keyvault-secrets==4.4.*
azure-keyvault-secrets==4.4.*
lxml==5.1.0
matplotlib==3.8.3
mlflow==2.11.1
openai==1.13.3
plotly==5.19.0
pypdf==4.1.0
pytesseract==0.3.10
python-dotenv==1.0.1
PyMuPDF==1.23.26
PyPDF2~=3.0
rouge-score==0.1.2
scikit-learn==1.4.1post1
sentence-transformers==2.5.1
spacy==3.7.4
textdistance==4.6.1
tiktoken==0.6.0
unstructured==0.11.8

0 comments on commit ff4d4a4

Please sign in to comment.