@@ -44,96 +44,102 @@ jobs:
44
44
env :
45
45
SKIP : no-commit-to-branch
46
46
47
- preload-cache :
48
- name : Preload HF cache
49
- runs-on : ubuntu-latest
50
- strategy :
51
- fail-fast : false
52
- matrix :
53
- python_version : ["3.11"]
54
- pytorch_version : ["2.6.0"]
55
- timeout-minutes : 20
56
-
57
- env :
58
- AXOLOTL_IS_CI_CACHE_PRELOAD : " 1"
59
-
60
- steps :
61
- - name : Check out repository code
62
- uses : actions/checkout@v4
63
-
64
- - name : Restore HF cache
65
- id : hf-cache-restore
66
- uses : actions/cache/restore@v4
67
- with :
68
- path : |
69
- /home/runner/.cache/huggingface/hub/datasets--*
70
- /home/runner/.cache/huggingface/hub/models--*
71
- key : ${{ runner.os }}-hf-hub-cache-v2
72
-
73
- - name : Setup Python
74
- uses : actions/setup-python@v5
75
- with :
76
- python-version : ${{ matrix.python_version }}
77
- cache : ' pip' # caching pip dependencies
78
-
79
- - name : upgrade pip
80
- run : |
81
- pip3 install --upgrade pip
82
- pip3 install --upgrade packaging==23.2 setuptools==75.8.0 wheel
83
-
84
- - name : Install PyTorch
85
- run : |
86
- pip3 install torch==${{ matrix.pytorch_version }}
87
-
88
- - name : Install dependencies
89
- run : |
90
- pip3 show torch
91
- pip3 install --no-build-isolation -U -e .
92
- python scripts/unsloth_install.py | sh
93
- python scripts/cutcrossentropy_install.py | sh
94
- pip3 install -r requirements-dev.txt -r requirements-tests.txt
95
-
96
- - name : Make sure PyTorch version wasn't clobbered
97
- run : |
98
- python -c "import torch; assert '${{ matrix.pytorch_version }}' in torch.__version__"
99
-
100
- - name : Ensure axolotl CLI was installed
101
- run : |
102
- axolotl --help
103
-
104
- - name : Pre-Download dataset fixture
105
- run : |
106
- huggingface-cli download --repo-type=dataset axolotl-ai-internal/axolotl-oss-dataset-fixtures
107
-
108
- - name : Run tests
109
- run : |
110
- pytest -v tests/conftest.py
111
-
112
- - name : Upload coverage to Codecov
113
- uses : codecov/codecov-action@v5
114
- with :
115
- token : ${{ secrets.CODECOV_TOKEN }}
116
- files : ./coverage.xml
117
- flags : unittests,pytorch-${{ matrix.pytorch_version }}
118
- fail_ci_if_error : false
119
-
120
- - name : cleanup pip cache
121
- run : |
122
- find "$(pip cache dir)/http-v2" -type f -mtime +14 -exec rm {} \;
123
-
124
- - name : Save HF cache
125
- id : hf-cache
126
- uses : actions/cache/save@v4
127
- with :
128
- path : |
129
- /home/runner/.cache/huggingface/hub/datasets--*
130
- /home/runner/.cache/huggingface/hub/models--*
131
- key : ${{ steps.hf-cache-restore.outputs.cache-primary-key }}
47
+ # preload-cache:
48
+ # name: Preload HF cache
49
+ # runs-on: ubuntu-latest
50
+ # strategy:
51
+ # fail-fast: false
52
+ # matrix:
53
+ # python_version: ["3.11"]
54
+ # pytorch_version: ["2.6.0"]
55
+ # timeout-minutes: 20
56
+ #
57
+ # env:
58
+ # AXOLOTL_IS_CI_CACHE_PRELOAD: "1"
59
+ #
60
+ # steps:
61
+ # - name: Check out repository code
62
+ # uses: actions/checkout@v4
63
+ #
64
+ # - name: Restore HF cache
65
+ # id: hf-cache-restore
66
+ # uses: actions/cache/restore@v4
67
+ # with:
68
+ # path: |
69
+ # /home/runner/.cache/huggingface/hub/datasets--*
70
+ # /home/runner/.cache/huggingface/hub/models--*
71
+ # key: ${{ runner.os }}-hf-hub-cache-v2
72
+ #
73
+ # - name: Restore Cache from S3
74
+ # id: hf-cache-restore-s3
75
+ # run: |
76
+ # mkdir -p /home/runner/.cache/huggingface/hub
77
+ # curl -L https://d1dttdx32dkk5p.cloudfront.net/hf-cache.tar.zst | tar -xf - -C /home/runner/.cache/huggingface/hub/ --use-compress-program unzstd
78
+ #
79
+ # - name: Setup Python
80
+ # uses: actions/setup-python@v5
81
+ # with:
82
+ # python-version: ${{ matrix.python_version }}
83
+ # cache: 'pip' # caching pip dependencies
84
+ #
85
+ # - name: upgrade pip
86
+ # run: |
87
+ # pip3 install --upgrade pip
88
+ # pip3 install --upgrade packaging==23.2 setuptools==75.8.0 wheel
89
+ #
90
+ # - name: Install PyTorch
91
+ # run: |
92
+ # pip3 install torch==${{ matrix.pytorch_version }}
93
+ #
94
+ # - name: Install dependencies
95
+ # run: |
96
+ # pip3 show torch
97
+ # pip3 install --no-build-isolation -U -e .
98
+ # python scripts/unsloth_install.py | sh
99
+ # python scripts/cutcrossentropy_install.py | sh
100
+ # pip3 install -r requirements-dev.txt -r requirements-tests.txt
101
+ #
102
+ # - name: Make sure PyTorch version wasn't clobbered
103
+ # run: |
104
+ # python -c "import torch; assert '${{ matrix.pytorch_version }}' in torch.__version__"
105
+ #
106
+ # - name: Ensure axolotl CLI was installed
107
+ # run: |
108
+ # axolotl --help
109
+ #
110
+ # - name: Pre-Download dataset fixture
111
+ # run: |
112
+ # huggingface-cli download --repo-type=dataset axolotl-ai-internal/axolotl-oss-dataset-fixtures
113
+ #
114
+ # - name: Run tests
115
+ # run: |
116
+ # pytest -v tests/conftest.py
117
+ #
118
+ # - name: Upload coverage to Codecov
119
+ # uses: codecov/codecov-action@v5
120
+ # with:
121
+ # token: ${{ secrets.CODECOV_TOKEN }}
122
+ # files: ./coverage.xml
123
+ # flags: unittests,pytorch-${{ matrix.pytorch_version }}
124
+ # fail_ci_if_error: false
125
+ #
126
+ # - name: cleanup pip cache
127
+ # run: |
128
+ # find "$(pip cache dir)/http-v2" -type f -mtime +14 -exec rm {} \;
129
+ #
130
+ # - name: Save HF cache
131
+ # id: hf-cache
132
+ # uses: actions/cache/save@v4
133
+ # with:
134
+ # path: |
135
+ # /home/runner/.cache/huggingface/hub/datasets--*
136
+ # /home/runner/.cache/huggingface/hub/models--*
137
+ # key: ${{ steps.hf-cache-restore.outputs.cache-primary-key }}
132
138
133
139
pytest :
134
140
name : PyTest
135
141
runs-on : ubuntu-latest
136
- needs : [preload-cache]
142
+ # needs: [preload-cache]
137
143
strategy :
138
144
fail-fast : false
139
145
matrix :
@@ -145,14 +151,20 @@ jobs:
145
151
- name : Check out repository code
146
152
uses : actions/checkout@v4
147
153
148
- - name : Restore HF cache
149
- id : hf-cache-restore
150
- uses : actions/cache/restore@v4
151
- with :
152
- path : |
153
- /home/runner/.cache/huggingface/hub/datasets--*
154
- /home/runner/.cache/huggingface/hub/models--*
155
- key : ${{ runner.os }}-hf-hub-cache-v2
154
+ # - name: Restore HF cache
155
+ # id: hf-cache-restore
156
+ # uses: actions/cache/restore@v4
157
+ # with:
158
+ # path: |
159
+ # /home/runner/.cache/huggingface/hub/datasets--*
160
+ # /home/runner/.cache/huggingface/hub/models--*
161
+ # key: ${{ runner.os }}-hf-hub-cache-v2
162
+
163
+ - name : Restore Cache from S3
164
+ id : hf-cache-restore-s3
165
+ run : |
166
+ mkdir -p /home/runner/.cache/huggingface/hub
167
+ curl -L https://d1dttdx32dkk5p.cloudfront.net/hf-cache.tar.zst | tar -xf - -C /home/runner/.cache/huggingface/hub/ --use-compress-program unzstd
156
168
157
169
- name : Setup Python
158
170
uses : actions/setup-python@v5
@@ -210,7 +222,7 @@ jobs:
210
222
pytest-sdist :
211
223
name : PyTest from Source Dist
212
224
runs-on : ubuntu-latest
213
- needs : [preload-cache]
225
+ # needs: [preload-cache]
214
226
strategy :
215
227
fail-fast : false
216
228
matrix :
@@ -222,14 +234,20 @@ jobs:
222
234
- name : Check out repository code
223
235
uses : actions/checkout@v4
224
236
225
- - name : Restore HF cache
226
- id : hf-cache-restore
227
- uses : actions/cache/restore@v4
228
- with :
229
- path : |
230
- /home/runner/.cache/huggingface/hub/datasets--*
231
- /home/runner/.cache/huggingface/hub/models--*
232
- key : ${{ runner.os }}-hf-hub-cache-v2
237
+ # - name: Restore HF cache
238
+ # id: hf-cache-restore
239
+ # uses: actions/cache/restore@v4
240
+ # with:
241
+ # path: |
242
+ # /home/runner/.cache/huggingface/hub/datasets--*
243
+ # /home/runner/.cache/huggingface/hub/models--*
244
+ # key: ${{ runner.os }}-hf-hub-cache-v2
245
+
246
+ - name : Restore Cache from S3
247
+ id : hf-cache-restore-s3
248
+ run : |
249
+ mkdir -p /home/runner/.cache/huggingface/hub
250
+ curl -L https://d1dttdx32dkk5p.cloudfront.net/hf-cache.tar.zst | tar -xf - -C /home/runner/.cache/huggingface/hub/ --use-compress-program unzstd
233
251
234
252
- name : Setup Python
235
253
uses : actions/setup-python@v5
0 commit comments