@@ -142,48 +142,47 @@ jobs:
142142
143143 Notebooks :
144144 runs-on : ubuntu-latest
145- if : ${{ always() && contains(join(needs.*.result, ','), 'success') }}
146145 needs : [Linting, Typing, Pytests]
147-
146+ strategy :
147+ matrix :
148+ # this line is automatically generated by the script in .github/workflows/scripts/update_notebook_matrix.sh
149+ 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"]
148150 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-
151+ COHERE_API_KEY : ${{ secrets.COHERE_API_KEY }}
152+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
153+ HUGGINGFACE_API_KEY : ${{ secrets.HUGGINGFACE_API_KEY }}
154+ NLTK_DATA : /tmp/nltk_data
153155 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
156+ - name : Checkout repository
157+ uses : actions/checkout@v2
158+ - name : Set up Python
159+ uses : actions/setup-python@v2
160+ with :
161+ python-version : 3.11.x
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+ - name : Install Poetry
168+ uses : snok/install-poetry@v1
169+ with :
170+ virtualenvs-create : true
171+ virtualenvs-in-project : true
172+ installer-parallel : true
173+ - name : Install dependencies
174+ run : |
175+ make full;
176+ poetry add openai==0.28.1 jupyter nbconvert cohere;
177+ - name : Check for pypdfium2
178+ run : poetry run pip show pypdfium2
179+ - name : Huggingface Hub Login
180+ run : poetry run huggingface-cli login --token $HUGGINGFACE_API_KEY
181+ - name : download nltk data
182+ run : |
183+ mkdir /tmp/nltk_data;
184+ poetry run python -m nltk.downloader -d /tmp/nltk_data punkt;
185+ - name : Use venv
186+ run : source .venv/bin/activate
187+ - name : Execute notebooks and check for errors
188+ run : bash ./.github/workflows/scripts/run_notebooks.sh ${{ matrix.notebook }}
0 commit comments