Repository navigation
Full training validation #2
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
| name: Full training validation | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '23 6 * * 1' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: full-training-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| notebooks: | |
| name: Train ${{ matrix.notebook }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 210 | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 3 | |
| matrix: | |
| notebook: | |
| - Appendix/Appendix.ipynb | |
| - Chapter 1/Ch1_Introduction.ipynb | |
| - Chapter 2/Ch2_book.ipynb | |
| - Chapter 3/Ch3_book.ipynb | |
| - Chapter 4/Ch4_book.ipynb | |
| - Chapter 5/Ch5_book.ipynb | |
| - Chapter 6/Ch6_book.ipynb | |
| - Chapter 6/MNIST Genetic Algorithm.ipynb | |
| - Chapter 7/Ch7_book.ipynb | |
| - Chapter 8/Ch8_book.ipynb | |
| - Chapter 9/Ch9_book.ipynb | |
| - Chapter 10/Ch10_book.ipynb | |
| - old_but_more_detailed/Ch4_PolicyGradients_.ipynb | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install torch==2.13.0 torchvision==0.28.0 --index-url https://download.pytorch.org/whl/cpu | |
| python -m pip install -r requirements.txt | |
| python -m pip check | |
| - name: Execute all cells with full training budgets | |
| env: | |
| NOTEBOOK: ${{ matrix.notebook }} | |
| run: python scripts/check_notebooks.py --mode full --notebook "$NOTEBOOK" | |
| - name: Train standalone genetic CartPole with default budget | |
| if: matrix.notebook == 'Chapter 6/Ch6_book.ipynb' | |
| env: | |
| OMP_NUM_THREADS: '1' | |
| MKL_NUM_THREADS: '1' | |
| run: | | |
| mkdir -p artifacts/standalone | |
| python "Chapter 6/main.py" --save_file artifacts/standalone/weights.pth > artifacts/standalone/training.log 2>&1 | |
| - name: Retain notebook logs and metrics | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: training-${{ strategy.job-index }} | |
| path: artifacts/ | |
| retention-days: 30 |