@@ -144,46 +144,46 @@ jobs:
144144 runs-on : ubuntu-latest
145145 if : ${{ always() && contains(join(needs.*.result, ','), 'success') }}
146146 needs : [Linting, Typing, Pytests]
147-
147+ strategy :
148+ matrix :
149+ # this line is automatically generated by the script in .github/workflows/scripts/update_notebook_matrix.sh
150+ notebook : ["bug_free_python_code.ipynb","check_for_pii.ipynb","competitors_check.ipynb","extracting_entities.ipynb","generate_structured_data.ipynb","generate_structured_data_cohere.ipynb","guardrails_with_chat_models.ipynb","input_validation.ipynb","llamaindex-output-parsing.ipynb","no_secrets_in_generated_text.ipynb","provenance.ipynb","recipe_generation.ipynb","regex_validation.ipynb","response_is_on_topic.ipynb","secrets_detection.ipynb","select_choice_based_on_action.ipynb","streaming.ipynb","syntax_error_free_sql.ipynb","text_summarization_quality.ipynb","toxic_language.ipynb","translation_to_specific_language.ipynb","translation_with_quality_check.ipynb","valid_chess_moves.ipynb","value_within_distribution.ipynb"]
148151 env :
149- COHERE_API_KEY : ${{ secrets.COHERE_API_KEY }}
150- OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
151- HUGGINGFACE_API_KEY : ${{ secrets.HUGGINGFACE_API_KEY }}
152-
152+ COHERE_API_KEY : ${{ secrets.COHERE_API_KEY }}
153+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
154+ HUGGINGFACE_API_KEY : ${{ secrets.HUGGINGFACE_API_KEY }}
155+ NLTK_DATA : /tmp/nltk_data
153156 steps :
154- - name : Checkout repository
155- uses : actions/checkout@v2
156-
157- - name : Set up Python
158- uses : actions/setup-python@v2
159- with :
160- python-version : 3.11.x
161-
162- - name : Poetry cache
163- uses : actions/cache@v3
164- with :
165- path : ~/.cache/pypoetry
166- key : poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.POETRY_VERSION }}
167-
168- - name : Install Poetry
169- uses : snok/install-poetry@v1
170- with :
171- virtualenvs-create : true
172- virtualenvs-in-project : true
173- installer-parallel : true
174-
175- - name : Install dependencies
176- run : |
177- make full;
178- poetry add openai==0.28.1 jupyter nbconvert cohere;
179- # pip install openai==0.28.1 jupyter nbconvert;
180- # pip install .;
181-
182- - name : Check for pypdfium2
183- run : poetry run pip show pypdfium2
184-
185- - name : Huggingface Hub Login
186- run : poetry run huggingface-cli login --token $HUGGINGFACE_API_KEY
187-
188- - name : Execute notebooks and check for errors
189- run : ./.github/workflows/scripts/run_notebooks.sh
157+ - name : Checkout repository
158+ uses : actions/checkout@v2
159+ - name : Set up Python
160+ uses : actions/setup-python@v2
161+ with :
162+ python-version : 3.11.x
163+ - name : Poetry cache
164+ uses : actions/cache@v3
165+ with :
166+ path : ~/.cache/pypoetry
167+ key : poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.POETRY_VERSION }}
168+ - name : Install Poetry
169+ uses : snok/install-poetry@v1
170+ with :
171+ virtualenvs-create : true
172+ virtualenvs-in-project : true
173+ installer-parallel : true
174+ - name : Install dependencies
175+ run : |
176+ make full;
177+ poetry add openai==0.28.1 jupyter nbconvert cohere;
178+ - name : Check for pypdfium2
179+ run : poetry run pip show pypdfium2
180+ - name : Huggingface Hub Login
181+ run : poetry run huggingface-cli login --token $HUGGINGFACE_API_KEY
182+ - name : download nltk data
183+ run : |
184+ mkdir /tmp/nltk_data;
185+ poetry run python -m nltk.downloader -d /tmp/nltk_data punkt;
186+ - name : Use venv
187+ run : source .venv/bin/activate
188+ - name : Execute notebooks and check for errors
189+ run : bash ./.github/workflows/scripts/run_notebooks.sh ${{ matrix.notebook }}
0 commit comments