notebooks: Reorganization in preparation for editing (#475) #2560
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will install Python dependencies and run the integration tests | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Integration Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - prod | |
| paths-ignore: | |
| - 'docs/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| integration: | |
| runs-on: | |
| group: ubuntu-vm-large | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install poetry | |
| run: pipx install poetry | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'poetry' | |
| - name: Install Python Dependencies | |
| run: | | |
| poetry config virtualenvs.in-project true | |
| poetry env use python3.11 | |
| poetry install -E huggingface -E llm | |
| poetry run pip install torch==2.0.1 --extra-index-url https://download.pytorch.org/whl/cpu | |
| poetry run pip install aequitas fairlearn vl-convert-python | |
| - name: Install R Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt install r-base r-base-dev | |
| - name: Build the package | |
| run: poetry build | |
| - name: Remove Build Environment | |
| run: rm -rf .venv | |
| - name: 'Setup Virtual Environment for [all]' | |
| run: python -m venv all-venv | |
| # This proves that the [all] install target works | |
| - name: 'Install Built Package for [all]' | |
| run: all-venv/bin/pip install --no-cache-dir "$(ls dist/validmind*.whl | head -n 1)[all]" | |
| - name: Install Additional Dependencies | |
| run: all-venv/bin/pip install nbformat papermill jupyter | |
| - name: Create Jupyter Kernel | |
| run: all-venv/bin/python -m ipykernel install --user --name all-venv | |
| - name: Integration Tests | |
| run: all-venv/bin/python scripts/run_e2e_notebooks.py --kernel all-venv | |
| env: | |
| NOTEBOOK_RUNNER_DEFAULT_MODEL: ${{ secrets.NOTEBOOK_RUNNER_DEFAULT_PROJECT_ID }} | |
| NOTEBOOK_RUNNER_API_KEY: ${{ secrets.NOTEBOOK_RUNNER_API_KEY }} | |
| NOTEBOOK_RUNNER_API_SECRET: ${{ secrets.NOTEBOOK_RUNNER_API_SECRET }} | |
| NOTEBOOK_RUNNER_API_HOST: 'https://api.dev.vm.validmind.ai/api/v1/tracking' | |
| VALIDMIND_LLM_DESCRIPTIONS_ENABLED: 0 | |
| - name: Failure Notification | |
| if: failure() | |
| run: | | |
| curl https://hooks.slack.com/triggers/T0313C4GBC5/6083618566112/${{ secrets.NOTEBOOK_RUNNER_HOOK_ID }} | |
| env: | |
| NOTEBOOK_RUNNER_HOOK_ID: ${{ secrets.NOTEBOOK_RUNNER_HOOK_ID }} |