forked from huggingface/nanotron
-
Notifications
You must be signed in to change notification settings - Fork 5
75 lines (68 loc) · 2.05 KB
/
3d_parallelism_unit_tests.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
65
66
67
68
69
70
71
72
73
74
75
name: Run non-FA2-related unit tests
on:
push:
branches: [ main ]
# Only run tests if we modify the following files
paths:
- "src/**/*.py"
- "examples/**/*.py"
- "tests/**/*.py"
pull_request:
branches: [ '**' ]
paths:
- "src/**/*.py"
- "examples/**/*.py"
- "tests/**/*.py"
jobs:
tests:
runs-on: [multi-gpu, nvidia-gpu, 8-t4, ci]
container:
image: runpod/pytorch:2.1.1-py3.10-cuda12.1.1-devel-ubuntu22.04
ports:
- 80
options: --gpus all --shm-size "8G"
steps:
- uses: actions/checkout@v3
- name: Python environment
run: |
which python
python --version
- 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: Install nanotron's dependencies
run: |
python -m pip install --upgrade pip
pip install packaging
pip install wheel
pip install -e .
pip install -e .[dev]
pip install -e .[test]
pip install -e .[nanosets]
- name: Show installed libraries and their versions
run: pip freeze | tee installed.txt
- name: Run nanotron tests
# NOTE: -m "not fa2" will run all the unit tests that don't have the mark
# "fa2" (these are FA2-related tests, we can't run it on T4)
run: |
pytest \
-m "not fa2" \
--color=yes \
--durations=0 \
--ignore tests/kernels \
--ignore tests/fp8 \
--verbose \
tests/
# NOTE: T4 can't run FA2, DoReMi's LLaMa needs FÀ
# - name: Run DoReMi tests
# # NOTE: -m "not fa2" will run all the unit tests that don't have the mark
# # "fa2" (these are FA2-related tests, we can't run it on T4)
# run: |
# pip install -r examples/doremi/requirements.txt && \
# pytest \
# --color=yes \
# --durations=0 \
# --verbose \
# examples/doremi/tests/