Install complete baseline test dependencies #3
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: Baseline executable tests | |
| on: | |
| pull_request: | |
| paths: | |
| - "baseline/**" | |
| - ".github/workflows/baseline-tests.yml" | |
| push: | |
| branches: | |
| - "agent/**" | |
| paths: | |
| - "baseline/**" | |
| - ".github/workflows/baseline-tests.yml" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: baseline-tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| core-baselines: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| cache-dependency-path: | | |
| baseline/pyproject.toml | |
| baseline/requirements.txt | |
| - name: Install CPU PyTorch and the complete baseline test environment | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu | |
| python -m pip install -e './baseline[experiment]' | |
| python -m pip install nbformat | |
| - name: Run core baseline tests | |
| env: | |
| PYTHONPATH: baseline | |
| MPLBACKEND: Agg | |
| run: python -m unittest discover -s baseline/tests -v | |
| one-head-nanogpt: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| cache-dependency-path: baseline/nanogpt_one_head/pyproject.toml | |
| - name: Install CPU PyTorch and one-head test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install torch --index-url https://download.pytorch.org/whl/cpu | |
| python -m pip install -e './baseline/nanogpt_one_head[dev]' | |
| - name: Run one-head tests | |
| env: | |
| PYTHONPATH: baseline/nanogpt_one_head/src | |
| MPLBACKEND: Agg | |
| run: pytest -q baseline/nanogpt_one_head/tests |