fix
This commit is contained in:
7
.github/workflows/tests-nightly.yml
vendored
7
.github/workflows/tests-nightly.yml
vendored
@@ -63,10 +63,9 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
uv pip show --system torch
|
uv pip show --system torch
|
||||||
uv pip install --system --no-build-isolation -U -e .
|
uv pip install --system --no-build-isolation -U -e ".[dev]"
|
||||||
python scripts/unsloth_install.py --uv | sh
|
python scripts/unsloth_install.py | sh
|
||||||
python scripts/cutcrossentropy_install.py --uv | sh
|
python scripts/cutcrossentropy_install.py | sh
|
||||||
uv pip install --system -e .[dev]
|
|
||||||
|
|
||||||
- name: Make sure PyTorch version wasn't clobbered
|
- name: Make sure PyTorch version wasn't clobbered
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
@@ -84,10 +84,10 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
uv pip show --system torch
|
uv pip show --system torch
|
||||||
uv pip install --system --no-build-isolation -U -e .
|
uv pip install --system wheel
|
||||||
python scripts/unsloth_install.py --uv | sh
|
uv pip install --system --no-build-isolation -U -e ".[dev]"
|
||||||
python scripts/cutcrossentropy_install.py --uv | sh
|
python scripts/unsloth_install.py | sh
|
||||||
uv pip install --system -e .[dev]
|
python scripts/cutcrossentropy_install.py | sh
|
||||||
|
|
||||||
- name: Make sure PyTorch version wasn't clobbered
|
- name: Make sure PyTorch version wasn't clobbered
|
||||||
run: |
|
run: |
|
||||||
@@ -157,8 +157,8 @@ jobs:
|
|||||||
uv pip show --system torch
|
uv pip show --system torch
|
||||||
uv pip install --system wheel
|
uv pip install --system wheel
|
||||||
uv pip install --system --no-build-isolation -e .
|
uv pip install --system --no-build-isolation -e .
|
||||||
python scripts/unsloth_install.py --uv | sh
|
python scripts/unsloth_install.py | sh
|
||||||
python scripts/cutcrossentropy_install.py --uv | sh
|
python scripts/cutcrossentropy_install.py | sh
|
||||||
uv pip install --system -e .[dev]
|
uv pip install --system -e .[dev]
|
||||||
|
|
||||||
- name: Make sure PyTorch version wasn't clobbered
|
- 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/monkeypatch/ --cov=axolotl --cov-append --cov-report=xml
|
||||||
pytest -v --durations=10 tests/cli/
|
pytest -v --durations=10 tests/cli/
|
||||||
|
|
||||||
|
|
||||||
gate-skip-e2e:
|
gate-skip-e2e:
|
||||||
needs: [pre-commit, pytest, pytest-sdist]
|
needs: [pre-commit, pytest, pytest-sdist]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -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; \
|
uv pip install --no-build-isolation -e .[deepspeed,flash-attn,ring-flash-attn,optimizers,ray] $AXOLOTL_ARGS; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RUN python scripts/unsloth_install.py --uv | sh
|
RUN python scripts/unsloth_install.py | sh
|
||||||
RUN python scripts/cutcrossentropy_install.py --uv | sh
|
RUN python scripts/cutcrossentropy_install.py | sh
|
||||||
|
|
||||||
# So we can test the Docker image
|
# So we can test the Docker image
|
||||||
RUN uv pip install -e .[dev]
|
RUN uv pip install -e .[dev]
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ RUN if [ "$AXOLOTL_EXTRAS" != "" ] ; then \
|
|||||||
else \
|
else \
|
||||||
uv pip install --no-build-isolation -e .[deepspeed,flash-attn,ring-flash-attn,optimizers,ray] $AXOLOTL_ARGS; \
|
uv pip install --no-build-isolation -e .[deepspeed,flash-attn,ring-flash-attn,optimizers,ray] $AXOLOTL_ARGS; \
|
||||||
fi && \
|
fi && \
|
||||||
python scripts/unsloth_install.py --uv | sh && \
|
python scripts/unsloth_install.py | sh && \
|
||||||
python scripts/cutcrossentropy_install.py --uv | sh && \
|
python scripts/cutcrossentropy_install.py | sh && \
|
||||||
uv pip install pytest
|
uv pip install pytest
|
||||||
|
|
||||||
# fix so that git fetch/pull from remote works with shallow clone
|
# fix so that git fetch/pull from remote works with shallow clone
|
||||||
|
|||||||
@@ -188,7 +188,6 @@ dev = [
|
|||||||
# Utilities
|
# Utilities
|
||||||
"blobfile",
|
"blobfile",
|
||||||
"tiktoken",
|
"tiktoken",
|
||||||
"wheel",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ except ImportError as exc:
|
|||||||
raise ImportError("Install torch via `pip install torch`") from exc
|
raise ImportError("Install torch via `pip install torch`") from exc
|
||||||
from packaging.version import Version as V
|
from packaging.version import Version as V
|
||||||
|
|
||||||
USE_UV = "--uv" in sys.argv[1:]
|
|
||||||
|
|
||||||
v = V(torch.__version__)
|
v = V(torch.__version__)
|
||||||
|
|
||||||
# no cut-cross-entropy support for torch < 2.4.0
|
# 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 = ""
|
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_cmd = "uv pip uninstall" if USE_UV else "pip"
|
UNINSTALL_PREFIX = "uv pip uninstall -y cut-cross-entropy && "
|
||||||
UNINSTALL_PREFIX = f"{uninstall_cmd} uninstall -y cut-cross-entropy && "
|
|
||||||
|
|
||||||
UV_PREFIX = "uv " if USE_UV else ""
|
|
||||||
|
|
||||||
print(
|
print(
|
||||||
UNINSTALL_PREFIX
|
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"'
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ except ImportError as error:
|
|||||||
raise ImportError("Install torch via `pip install torch`") from error
|
raise ImportError("Install torch via `pip install torch`") from error
|
||||||
from packaging.version import Version as V
|
from packaging.version import Version as V
|
||||||
|
|
||||||
use_uv = "--uv" in sys.argv[1:]
|
|
||||||
|
|
||||||
v = V(torch.__version__)
|
v = V(torch.__version__)
|
||||||
cuda = str(torch.version.cuda)
|
cuda = str(torch.version.cuda)
|
||||||
try:
|
try:
|
||||||
@@ -34,7 +32,6 @@ elif v < V("2.6.0"):
|
|||||||
else:
|
else:
|
||||||
raise RuntimeError(f"Torch = {v} too new!")
|
raise RuntimeError(f"Torch = {v} too new!")
|
||||||
x = x.format(cuda.replace(".", ""), "-ampere" if is_ampere else "")
|
x = x.format(cuda.replace(".", ""), "-ampere" if is_ampere else "")
|
||||||
uv_prefix = "uv " if use_uv else ""
|
|
||||||
print(
|
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"'
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user