git SHA
This commit is contained in:
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -68,6 +68,8 @@ jobs:
|
|||||||
PYTORCH_VERSION=${{ matrix.pytorch }}
|
PYTORCH_VERSION=${{ matrix.pytorch }}
|
||||||
AXOLOTL_ARGS=${{ matrix.axolotl_args }}
|
AXOLOTL_ARGS=${{ matrix.axolotl_args }}
|
||||||
AXOLOTL_EXTRAS=${{ matrix.axolotl_extras}}
|
AXOLOTL_EXTRAS=${{ matrix.axolotl_extras}}
|
||||||
|
GIT_REF=${{ github.ref }}
|
||||||
|
GIT_SHA=${{ github.sha }}
|
||||||
file: ./docker/Dockerfile
|
file: ./docker/Dockerfile
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: |
|
tags: |
|
||||||
@@ -205,6 +207,8 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
BASE_TAG=${{ github.ref_type == 'tag' && 'main' || github.ref_name }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
|
BASE_TAG=${{ github.ref_type == 'tag' && 'main' || github.ref_name }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
|
||||||
CUDA=${{ matrix.cuda }}
|
CUDA=${{ matrix.cuda }}
|
||||||
|
GIT_REF=${{ github.ref }}
|
||||||
|
GIT_SHA=${{ github.sha }}
|
||||||
file: ./docker/Dockerfile-cloud-no-tmux
|
file: ./docker/Dockerfile-cloud-no-tmux
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: |
|
tags: |
|
||||||
|
|||||||
@@ -1,23 +1,27 @@
|
|||||||
"""Print the uv commands required to install Unsloth without altering Torch."""
|
"""Emit the uv commands needed to install Unsloth without touching torch."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import torch
|
import torch
|
||||||
except ImportError as error:
|
except ImportError as exc: # pragma: no cover
|
||||||
raise ImportError("Install torch via `pip install torch`") from error
|
raise ImportError("Install torch via `pip install torch`") from exc
|
||||||
|
|
||||||
from packaging.version import Version as V
|
from packaging.version import Version as V
|
||||||
|
|
||||||
TORCH_MIN = V("2.6.0")
|
torch_version = V(torch.__version__.split("+")[0])
|
||||||
UNSLOTH_BASE = (
|
|
||||||
"uv pip install --system --no-deps unsloth-zoo==2025.9.12"
|
|
||||||
' && uv pip install --system --no-deps "unsloth[huggingface]==2025.9.9"'
|
|
||||||
)
|
|
||||||
|
|
||||||
version = V(torch.__version__)
|
# Unsloth supports torch >= 2.6.0 via the 2025.9 builds.
|
||||||
if version < TORCH_MIN:
|
MIN_TORCH = V("2.6.0")
|
||||||
|
|
||||||
|
if torch_version < MIN_TORCH:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
f"Torch {version} detected, but Unsloth requires >= {TORCH_MIN}. "
|
f"Torch {torch.__version__} detected, but Unsloth requires >= {MIN_TORCH}."
|
||||||
"Upgrade your torch install and re-run this helper."
|
|
||||||
)
|
)
|
||||||
|
|
||||||
print(UNSLOTH_BASE)
|
commands = (
|
||||||
|
"uv pip install --system --no-deps unsloth-zoo==2025.9.12 && "
|
||||||
|
'uv pip install --system --no-deps "unsloth[huggingface]==2025.9.9"'
|
||||||
|
)
|
||||||
|
|
||||||
|
print(commands)
|
||||||
|
|||||||
Reference in New Issue
Block a user