wip
This commit is contained in:
53
.github/workflows/tests.yml
vendored
53
.github/workflows/tests.yml
vendored
@@ -41,7 +41,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
|
||||||
@@ -72,24 +71,18 @@ 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: Install uv
|
- name: Install uv
|
||||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
uses: astral-sh/setup-uv@v4
|
||||||
|
with:
|
||||||
- name: upgrade pip
|
version: "latest"
|
||||||
run: |
|
|
||||||
pip3 install --upgrade pip
|
|
||||||
pip3 install --upgrade packaging==23.2 setuptools==75.8.0 wheel
|
|
||||||
|
|
||||||
- name: Install PyTorch
|
- name: Install PyTorch
|
||||||
run: |
|
run: |
|
||||||
source $HOME/.local/bin/env
|
|
||||||
uv pip install torch==${{ matrix.pytorch_version }} torchvision
|
uv pip install torch==${{ matrix.pytorch_version }} torchvision
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
source $HOME/.local/bin/env
|
|
||||||
uv pip show torch
|
uv pip show torch
|
||||||
uv pip install --no-build-isolation -U -e .
|
uv pip install --no-build-isolation -U -e .
|
||||||
python scripts/unsloth_install.py --uv | sh
|
python scripts/unsloth_install.py --uv | sh
|
||||||
@@ -123,9 +116,6 @@ jobs:
|
|||||||
flags: unittests,pytorch-${{ matrix.pytorch_version }}
|
flags: unittests,pytorch-${{ matrix.pytorch_version }}
|
||||||
fail_ci_if_error: false
|
fail_ci_if_error: false
|
||||||
|
|
||||||
- name: cleanup pip cache
|
|
||||||
run: |
|
|
||||||
find "$(pip cache dir)/http-v2" -type f -mtime +14 -exec rm {} \;
|
|
||||||
|
|
||||||
pytest-sdist:
|
pytest-sdist:
|
||||||
name: PyTest from Source Dist
|
name: PyTest from Source Dist
|
||||||
@@ -152,25 +142,20 @@ 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: Install uv
|
- name: Install uv
|
||||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
uses: astral-sh/setup-uv@v4
|
||||||
|
with:
|
||||||
- name: upgrade pip
|
version: "latest"
|
||||||
run: |
|
|
||||||
pip3 install --upgrade pip
|
|
||||||
pip3 install --upgrade packaging==23.2 setuptools==75.8.0 setuptools_scm build wheel
|
|
||||||
|
|
||||||
- name: Install PyTorch
|
- name: Install PyTorch
|
||||||
run: |
|
run: |
|
||||||
source $HOME/.local/bin/env
|
|
||||||
uv pip install torch==${{ matrix.pytorch_version }} torchvision
|
uv pip install torch==${{ matrix.pytorch_version }} torchvision
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
source $HOME/.local/bin/env
|
|
||||||
uv pip show torch
|
uv pip show torch
|
||||||
|
uv pip install build
|
||||||
python -m build --no-isolation --sdist
|
python -m build --no-isolation --sdist
|
||||||
uv pip install --no-build-isolation dist/axolotl*.tar.gz
|
uv pip install --no-build-isolation dist/axolotl*.tar.gz
|
||||||
python scripts/unsloth_install.py --uv | sh
|
python scripts/unsloth_install.py --uv | sh
|
||||||
@@ -194,9 +179,6 @@ jobs:
|
|||||||
pytest -v --durations=10 tests/monkeypatch/ --cov=axolotl --cov-append --cov-report=xml
|
pytest -v --durations=10 tests/monkeypatch/ --cov=axolotl --cov-append --cov-report=xml
|
||||||
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 {} \;
|
|
||||||
|
|
||||||
gate-skip-e2e:
|
gate-skip-e2e:
|
||||||
needs: [pre-commit, pytest, pytest-sdist]
|
needs: [pre-commit, pytest, pytest-sdist]
|
||||||
@@ -261,10 +243,13 @@ 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-uv-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
|
||||||
@@ -322,10 +307,13 @@ 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-uv-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
|
||||||
@@ -365,10 +353,13 @@ 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-uv-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
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ cce_spec = importlib.util.find_spec("cut_cross_entropy")
|
|||||||
UNINSTALL_PREFIX = ""
|
UNINSTALL_PREFIX = ""
|
||||||
if cce_spec:
|
if cce_spec:
|
||||||
if not importlib.util.find_spec("cut_cross_entropy.transformers"):
|
if not importlib.util.find_spec("cut_cross_entropy.transformers"):
|
||||||
UNINSTALL_PREFIX = "pip uninstall -y cut-cross-entropy && "
|
uninstall_cmd = "uv pip uninstall" if USE_UV else "pip"
|
||||||
|
UNINSTALL_PREFIX = f"{uninstall_cmd} uninstall -y cut-cross-entropy && "
|
||||||
|
|
||||||
UV_PREFIX = "uv " if USE_UV else ""
|
UV_PREFIX = "uv " if USE_UV else ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user