Fix bug of mathbook question extract and update mineru backend in mat… #37
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: Python tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - "**/*.py" | |
| - "requirements.txt" | |
| - ".github/workflows/*.yml" | |
| pull_request: | |
| branches: [ "main" ] | |
| paths: | |
| - "**/*.py" | |
| - "requirements.txt" | |
| - ".github/workflows/*.yml" | |
| jobs: | |
| test: | |
| name: Run tests on ${{ matrix.os }} with Python ${{ matrix.python }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
| torch: [{base: '2.5.1', vision: '0.20.1'}] | |
| python: ["3.10", "3.11", "3.12"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install testing dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install wheel | |
| pip install -r requirements.txt | |
| pip install -e .[vllm] | |
| - name: Run tests on Windows | |
| if: startsWith(matrix.os, 'windows') | |
| env: | |
| PYTHONDONTWRITEBYTECODE: 1 | |
| # torchrun --nproc_per_node=2 -m pytest ./tests/dist | |
| run: | | |
| pytest -m cpu test | |
| - name: Run '${{ matrix.testmarker }}' tests on Linux / Mac | |
| if: ${{ !startsWith(matrix.os, 'windows') }} | |
| env: | |
| # LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4 | |
| PYTHONDONTWRITEBYTECODE: 1 | |
| run: | | |
| pytest -m cpu test | |
| # big-model-test: | |
| # if: github.repository == 'OpenDCAI/DataFlow-Preview' | |
| # runs-on: [self-hosted] # 跑在你的私有 GPU runner 上 | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Install GPU dependencies | |
| # run: pip install -e . | |
| # - name: upgrade omegaconf | |
| # run: pip install --upgrade omegaconf | |
| # - name: Run GPU tests | |
| # run: | | |
| # pytest -m gpu test |