-
Notifications
You must be signed in to change notification settings - Fork 129
64 lines (54 loc) · 1.5 KB
/
test_3d_parallelism.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Run unit tests
on:
workflow_dispatch:
push:
branches: [ main ]
# paths:
# - "src/**/*.py"
# - "examples/**/*.py"
# - "tests/**/*.py"
pull_request:
branches: [ main ]
#paths:
# - "src/**/*.py"
# - "examples/**/*.py"
# - "tests/**/*.py"
jobs:
tests:
runs-on: [multi-gpu, nvidia-gpu, 8-t4, ci]
steps:
- uses: actions/checkout@v3
- 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
- name: Instal nanotron
run: |
python -m pip install --upgrade pip
pip install packaging
pip install wheel
pip install torch
pip install "flash-attn>=2.4.2" --no-build-isolation
git clone [email protected]:huggingface/nanotron.git
cd nanotron
pip install -e .
- name: Install test dependencies
run: |
pip install pytest
pip install pytest-cov
- name: Check Pytorch version
run: |
nvidia-smi
python -c "import torch; print('torch:', torch.__version__, torch)"
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
- name: Show installed libraries and their versions
run: pip freeze | tee installed.txt
- name: Run tests
run: pytest --color=yes --durations=0 --verbose tests/