Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .github/workflows/test-paddle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
build-and-test-paddle:
name: Build and Test (${{ matrix.os }}, Python ${{ matrix.python-version }}), PaddlePaddle ${{ matrix.paddle-version }}
name: Test Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -26,23 +26,15 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libnuma-dev gcc g++ make
- name: Cache pip packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cpu
pip install paddlepaddle==3.3.0
pip install pytest pytest-cov setuptools_scm safetensors transformers=4.52
pip install paddlepaddle==3.0.0
pip install pytest pytest-cov setuptools_scm safetensors transformers==4.52
- name: Build Package
run: |
pip install .
Expand All @@ -55,12 +47,12 @@ jobs:
COVERAGE_FILE=.coverage_1 CUDA_VISIBLE_DEVICES="" pytest -s --cov=${LIBDIR} test_fastsafetensors.py > /tmp/pytest-log/1.log 2>&1
COVERAGE_FILE=.coverage_2 torchrun --nnodes=2 --master_addr=0.0.0.0 --master_port=1234 --node_rank=0 --no-python pytest -s --cov=${LIBDIR} test_multi.py > /tmp/pytest-log/2.log 2>&1 &
COVERAGE_FILE=.coverage_3 torchrun --nnodes=2 --master_addr=0.0.0.0 --master_port=1234 --node_rank=1 --no-python pytest -s --cov=${LIBDIR} test_multi.py > /tmp/pytest-log/3.log 2>&1
coverage combine .coverage_0 .coverage_1 .coverage_2 .coverage_3 .coverage_4
coverage combine .coverage_0 .coverage_1 .coverage_2 .coverage_3
coverage html
mv htmlcov /tmp/pytest-log
- name: upload pytest log
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-log
name: pytest-log-paddle-${{ matrix.python-version }}
path: /tmp/pytest-log
Loading