diff --git a/.github/workflows/tests-nightly.yml b/.github/workflows/tests-nightly.yml index b1e85cc2a..0c489eff1 100644 --- a/.github/workflows/tests-nightly.yml +++ b/.github/workflows/tests-nightly.yml @@ -63,10 +63,9 @@ jobs: - name: Install dependencies run: | uv pip show --system torch - uv pip install --system --no-build-isolation -U -e . - python scripts/unsloth_install.py --uv | sh - python scripts/cutcrossentropy_install.py --uv | sh - uv pip install --system -e .[dev] + uv pip install --system --no-build-isolation -U -e ".[dev]" + python scripts/unsloth_install.py | sh + python scripts/cutcrossentropy_install.py | sh - name: Make sure PyTorch version wasn't clobbered run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a0eccfe81..e39c758e8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -84,10 +84,10 @@ jobs: - name: Install dependencies run: | uv pip show --system torch - uv pip install --system --no-build-isolation -U -e . - python scripts/unsloth_install.py --uv | sh - python scripts/cutcrossentropy_install.py --uv | sh - uv pip install --system -e .[dev] + uv pip install --system wheel + uv pip install --system --no-build-isolation -U -e ".[dev]" + python scripts/unsloth_install.py | sh + python scripts/cutcrossentropy_install.py | sh - name: Make sure PyTorch version wasn't clobbered run: | @@ -157,8 +157,8 @@ jobs: uv pip show --system torch uv pip install --system wheel uv pip install --system --no-build-isolation -e . - python scripts/unsloth_install.py --uv | sh - python scripts/cutcrossentropy_install.py --uv | sh + python scripts/unsloth_install.py | sh + python scripts/cutcrossentropy_install.py | sh uv pip install --system -e .[dev] - name: Make sure PyTorch version wasn't clobbered @@ -178,7 +178,6 @@ jobs: pytest -v --durations=10 tests/monkeypatch/ --cov=axolotl --cov-append --cov-report=xml pytest -v --durations=10 tests/cli/ - gate-skip-e2e: needs: [pre-commit, pytest, pytest-sdist] runs-on: ubuntu-latest diff --git a/cicd/Dockerfile.jinja b/cicd/Dockerfile.jinja index 9c37c484e..d294460d7 100644 --- a/cicd/Dockerfile.jinja +++ b/cicd/Dockerfile.jinja @@ -38,8 +38,8 @@ RUN if [ "$AXOLOTL_EXTRAS" != "" ] ; then \ uv pip install --no-build-isolation -e .[deepspeed,flash-attn,ring-flash-attn,optimizers,ray] $AXOLOTL_ARGS; \ fi -RUN python scripts/unsloth_install.py --uv | sh -RUN python scripts/cutcrossentropy_install.py --uv | sh +RUN python scripts/unsloth_install.py | sh +RUN python scripts/cutcrossentropy_install.py | sh # So we can test the Docker image RUN uv pip install -e .[dev] diff --git a/docker/Dockerfile b/docker/Dockerfile index 958c971b8..2c64364ac 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -26,8 +26,8 @@ RUN if [ "$AXOLOTL_EXTRAS" != "" ] ; then \ else \ uv pip install --no-build-isolation -e .[deepspeed,flash-attn,ring-flash-attn,optimizers,ray] $AXOLOTL_ARGS; \ fi && \ - python scripts/unsloth_install.py --uv | sh && \ - python scripts/cutcrossentropy_install.py --uv | sh && \ + python scripts/unsloth_install.py | sh && \ + python scripts/cutcrossentropy_install.py | sh && \ uv pip install pytest # fix so that git fetch/pull from remote works with shallow clone diff --git a/pyproject.toml b/pyproject.toml index 1f688a91c..f503cda8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -188,7 +188,6 @@ dev = [ # Utilities "blobfile", "tiktoken", - "wheel", ] [project.scripts] diff --git a/scripts/cutcrossentropy_install.py b/scripts/cutcrossentropy_install.py index 451df38aa..050461971 100644 --- a/scripts/cutcrossentropy_install.py +++ b/scripts/cutcrossentropy_install.py @@ -9,8 +9,6 @@ except ImportError as exc: raise ImportError("Install torch via `pip install torch`") from exc from packaging.version import Version as V -USE_UV = "--uv" in sys.argv[1:] - v = V(torch.__version__) # no cut-cross-entropy support for torch < 2.4.0 @@ -23,12 +21,9 @@ cce_spec = importlib.util.find_spec("cut_cross_entropy") UNINSTALL_PREFIX = "" if cce_spec: if not importlib.util.find_spec("cut_cross_entropy.transformers"): - 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 "" + UNINSTALL_PREFIX = "uv pip uninstall -y cut-cross-entropy && " print( UNINSTALL_PREFIX - + f'{UV_PREFIX}pip install "cut-cross-entropy[transformers] @ git+https://github.com/axolotl-ai-cloud/ml-cross-entropy.git@147ea28"' + + 'uv pip install --system "cut-cross-entropy[transformers] @ git+https://github.com/axolotl-ai-cloud/ml-cross-entropy.git@c6a32c5"' ) diff --git a/scripts/unsloth_install.py b/scripts/unsloth_install.py index c0e5bbe70..8b06e81b3 100644 --- a/scripts/unsloth_install.py +++ b/scripts/unsloth_install.py @@ -7,8 +7,6 @@ except ImportError as error: raise ImportError("Install torch via `pip install torch`") from error from packaging.version import Version as V -use_uv = "--uv" in sys.argv[1:] - v = V(torch.__version__) cuda = str(torch.version.cuda) try: @@ -34,7 +32,6 @@ elif v < V("2.6.0"): else: raise RuntimeError(f"Torch = {v} too new!") x = x.format(cuda.replace(".", ""), "-ampere" if is_ampere else "") -uv_prefix = "uv " if use_uv else "" print( - f'{uv_prefix}pip install unsloth-zoo==2024.12.1 && {uv_prefix}pip install --no-deps "unsloth[{x}]==2024.12.4"' + f'uv pip install --system unsloth-zoo==2024.12.1 && uv pip install --system --no-deps "unsloth[{x}]==2024.12.4"' )