This commit is contained in:
Dan Saunders
2025-08-29 21:58:35 -04:00
parent 459e5f9b16
commit 400120af2d
7 changed files with 45 additions and 31 deletions

View File

@@ -20,10 +20,14 @@ jobs:
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install dependencies - name: Install dependencies
run: | run: |
python3 -m pip install jupyter quartodoc uv pip install jupyter quartodoc
python3 -m pip install -e . uv pip install -e .
- name: Build autodoc - name: Build autodoc
run: quartodoc build run: quartodoc build
- name: Publish to GitHub Pages (and render) - name: Publish to GitHub Pages (and render)

View File

@@ -23,5 +23,4 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.11"
cache: 'pip' # caching pip dependencies
- uses: pre-commit/action@v3.0.1 - uses: pre-commit/action@v3.0.1

View File

@@ -56,13 +56,16 @@ jobs:
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install Modal - name: Install Modal
run: | run: |
python -m pip install --upgrade pip uv pip install modal==1.0.2 jinja2
pip install modal==1.0.2 jinja2
- name: Update env vars - name: Update env vars
run: | run: |
echo "BASE_TAG=main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV echo "BASE_TAG=main-base-uv-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV
echo "PYTORCH_VERSION=${{ matrix.pytorch}}" >> $GITHUB_ENV echo "PYTORCH_VERSION=${{ matrix.pytorch}}" >> $GITHUB_ENV
echo "AXOLOTL_ARGS=${{ matrix.axolotl_args}}" >> $GITHUB_ENV echo "AXOLOTL_ARGS=${{ matrix.axolotl_args}}" >> $GITHUB_ENV
echo "AXOLOTL_EXTRAS=${{ matrix.axolotl_extras}}" >> $GITHUB_ENV echo "AXOLOTL_EXTRAS=${{ matrix.axolotl_extras}}" >> $GITHUB_ENV

View File

@@ -18,10 +18,15 @@ jobs:
with: with:
python-version: '3.11' python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Update pre-commit hooks - name: Update pre-commit hooks
id: update id: update
run: | run: |
pip install pre-commit uv pip install pre-commit
pre-commit autoupdate pre-commit autoupdate
if [[ -n $(git status --porcelain) ]]; then if [[ -n $(git status --porcelain) ]]; then
echo "changes=true" >> $GITHUB_OUTPUT echo "changes=true" >> $GITHUB_OUTPUT

View File

@@ -40,10 +40,15 @@ jobs:
with: with:
python-version: '3.11' python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install dependencies - name: Install dependencies
run: | run: |
python3 -m pip install jupyter quartodoc uv pip install jupyter quartodoc
python3 -m pip install -e . uv pip install -e .
- name: Build autodoc - name: Build autodoc
run: quartodoc build run: quartodoc build

View File

@@ -38,11 +38,16 @@ jobs:
with: with:
python-version: "3.11" python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install dependencies - name: Install dependencies
run: | run: |
pip3 install wheel packaging==23.2 uv pip install wheel packaging==23.2
pip3 install --no-build-isolation -e . uv pip install --no-build-isolation -e .
pip3 install -r requirements-dev.txt -r requirements-tests.txt uv pip install -r requirements-dev.txt -r requirements-tests.txt
- name: Extract tag name - name: Extract tag name
id: tag id: tag

View File

@@ -13,7 +13,6 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.11"
cache: 'pip' # caching pip dependencies
- uses: pre-commit/action@v3.0.1 - uses: pre-commit/action@v3.0.1
env: env:
SKIP: no-commit-to-branch SKIP: no-commit-to-branch
@@ -43,16 +42,15 @@ jobs:
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python_version }} python-version: ${{ matrix.python_version }}
cache: 'pip' # caching pip dependencies
- name: upgrade pip - name: Install uv
run: | uses: astral-sh/setup-uv@v4
pip3 install --upgrade pip with:
pip3 install --upgrade packaging==23.2 setuptools==75.8.0 wheel version: "latest"
- name: Install PyTorch - name: Install PyTorch
run: | run: |
pip3 install torch==${{ matrix.pytorch_version }} torchvision uv pip install torch==${{ matrix.pytorch_version }} torchvision
- name: Update requirements.txt - name: Update requirements.txt
run: | run: |
@@ -64,11 +62,11 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
pip3 show torch uv pip show torch
pip3 install --no-build-isolation -U -e . uv pip install --no-build-isolation -U -e .
python scripts/unsloth_install.py | sh python scripts/unsloth_install.py --uv | sh
python scripts/cutcrossentropy_install.py | sh python scripts/cutcrossentropy_install.py --uv | sh
pip3 install -r requirements-dev.txt -r requirements-tests.txt uv pip install -r requirements-dev.txt -r requirements-tests.txt
- name: Make sure PyTorch version wasn't clobbered - name: Make sure PyTorch version wasn't clobbered
run: | run: |
@@ -84,9 +82,6 @@ jobs:
pytest -v --durations=10 tests/patched/ pytest -v --durations=10 tests/patched/
pytest -v --durations=10 tests/cli/ pytest -v --durations=10 tests/cli/
- name: cleanup pip cache
run: |
find "$(pip cache dir)/http-v2" -type f -mtime +14 -exec rm {} \;
docker-e2e-tests: docker-e2e-tests:
if: github.repository_owner == 'axolotl-ai-cloud' if: github.repository_owner == 'axolotl-ai-cloud'
@@ -122,8 +117,7 @@ jobs:
python-version: "3.11" python-version: "3.11"
- name: Install Modal - name: Install Modal
run: | run: |
python -m pip install --upgrade pip uv pip install modal==1.0.2 jinja2
pip install modal==1.0.2 jinja2
- name: Update env vars - name: Update env vars
run: | run: |
echo "BASE_TAG=main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV echo "BASE_TAG=main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV
@@ -164,8 +158,7 @@ jobs:
python-version: "3.11" python-version: "3.11"
- name: Install Modal - name: Install Modal
run: | run: |
python -m pip install --upgrade pip uv pip install modal==1.0.2 jinja2
pip install modal==1.0.2 jinja2
- name: Update env vars - name: Update env vars
run: | run: |
echo "BASE_TAG=main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV echo "BASE_TAG=main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}" >> $GITHUB_ENV