Skip to content

Workflow file for this run

name: Run unit tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
paths:
- "src/**.py"
- "examples/**.py"
- "tests/**.py"
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10
- name: Python environment
run: |
which python
python --version
- name: Check container state
run: |
nvidia-smi
python -c "import torch; print('torch:', torch.__version__, torch)"
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
- name: Instal nanotron
run: |
python -m pip install --upgrade pip
pip install torch
pip install packaging; pip install "flash-attn>=2.4.2" --no-build-isolation
git clone git@github.com:huggingface/nanotron.git
cd nanotron
pip install -e .
- name: Install test dependencies
run: |
pip install pytest
pip install pytest-cov
- name: Python dependencies
run: |

Check failure on line 51 in .github/workflows/tests.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yaml

Invalid workflow file

You have an error in your yaml syntax on line 51
pip list
- name: Run tests
run: pytest --color=yes --durations=0 --verbose tests/