diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 95370ca3d..1cbfc15e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -66,12 +66,12 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - - name: Restore Cache from S3 - id: hf-cache-restore-s3 - run: | - mkdir -p /home/runner/.cache/huggingface/hub - curl -L https://d1dttdx32dkk5p.cloudfront.net/hf-cache.tar.zst | tar -xf - -C /home/runner/.cache/huggingface/hub/ --use-compress-program unzstd - +# - name: Restore Cache from S3 +# id: hf-cache-restore-s3 +# run: | +# mkdir -p ~/.cache/huggingface/hub +# curl -L https://d1dttdx32dkk5p.cloudfront.net/hf-cache.tar.zst | tar -xf - -C ~/.cache/huggingface/hub/ --use-compress-program unzstd +# - name: Setup Python uses: actions/setup-python@v5 with: @@ -113,9 +113,13 @@ jobs: - name: Run tests run: | + df -h pytest -v --durations=10 -n8 --dist loadfile --ignore=tests/e2e/ --ignore=tests/patched/ --ignore=tests/cli/ --ignore=tests/monkeypatch/ tests/ --cov=axolotl --cov-report=xml + df -h pytest -v --durations=10 tests/monkeypatch/ --cov=axolotl --cov-append --cov-report=xml + df -h pytest -v --durations=10 tests/patched/ --cov=axolotl --cov-append --cov-report=xml + df -h pytest -v --durations=10 tests/cli/ --cov=axolotl --cov-append --cov-report=xml - name: Upload coverage to Codecov @@ -145,12 +149,12 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - - name: Restore Cache from S3 - id: hf-cache-restore-s3 - run: | - mkdir -p /home/runner/.cache/huggingface/hub - curl -L https://d1dttdx32dkk5p.cloudfront.net/hf-cache.tar.zst | tar -xf - -C /home/runner/.cache/huggingface/hub/ --use-compress-program unzstd - +# - name: Restore Cache from S3 +# id: hf-cache-restore-s3 +# run: | +# mkdir -p ~/.cache/huggingface/hub +# curl -L https://d1dttdx32dkk5p.cloudfront.net/hf-cache.tar.zst | tar -xf - -C ~/.cache/huggingface/hub/ --use-compress-program unzstd +# - name: Setup Python uses: actions/setup-python@v5 with: @@ -188,7 +192,7 @@ jobs: axolotl --help - name: Show HF cache - run: huggingface-cli scan-cache + run: hf cache scan - name: Run tests run: | diff --git a/.runpod/Dockerfile b/.runpod/Dockerfile index 107caf5f3..948d3f78e 100644 --- a/.runpod/Dockerfile +++ b/.runpod/Dockerfile @@ -10,6 +10,7 @@ ARG BASE_VOLUME="/runpod-volume" ENV BASE_VOLUME=$BASE_VOLUME ENV HF_DATASETS_CACHE="${BASE_VOLUME}/huggingface-cache/datasets" ENV HUGGINGFACE_HUB_CACHE="${BASE_VOLUME}/huggingface-cache/hub" +ENV HF_HUB_CACHE="${BASE_VOLUME}/huggingface-cache/hub" ENV TRANSFORMERS_CACHE="${BASE_VOLUME}/huggingface-cache/hub" COPY .runpod/src /src diff --git a/setup.py b/setup.py index a1bdd6bdf..e22df40c8 100644 --- a/setup.py +++ b/setup.py @@ -66,7 +66,6 @@ def parse_requirements(extras_require_map): extras_require_map.pop("fbgemm-gpu") extras_require_map["fbgemm-gpu"] = ["fbgemm-gpu-genai==1.4.1"] extras_require_map["vllm"] = ["vllm==0.11.1"] - _install_requires.pop(_install_requires.index(xformers_version)) elif (major, minor) >= (2, 8): extras_require_map.pop("fbgemm-gpu") extras_require_map["fbgemm-gpu"] = ["fbgemm-gpu-genai==1.3.0"] diff --git a/src/axolotl/cli/main.py b/src/axolotl/cli/main.py index dc6cca489..c0ac32050 100644 --- a/src/axolotl/cli/main.py +++ b/src/axolotl/cli/main.py @@ -26,7 +26,7 @@ from axolotl.cli.utils import ( launch_training, ) from axolotl.integrations.lm_eval.cli import lm_eval -from axolotl.utils import set_pytorch_cuda_alloc_conf +from axolotl.utils import set_misc_env, set_pytorch_cuda_alloc_conf from axolotl.utils.logging import get_logger from axolotl.utils.schemas.config import AxolotlInputConfig @@ -45,6 +45,7 @@ def cli(): print_axolotl_text_art() load_dotenv() set_pytorch_cuda_alloc_conf() + set_misc_env() @cli.command() diff --git a/src/axolotl/utils/__init__.py b/src/axolotl/utils/__init__.py index 72f8173f3..de67aadd0 100644 --- a/src/axolotl/utils/__init__.py +++ b/src/axolotl/utils/__init__.py @@ -51,6 +51,11 @@ def set_pytorch_cuda_alloc_conf(): ) +def set_misc_env(): + if os.getenv("XFORMERS_IGNORE_FLASH_VERSION_CHECK") is None: + os.environ["XFORMERS_IGNORE_FLASH_VERSION_CHECK"] = "1" + + def get_not_null(value, default=None): """ return the value if it's not None, otherwise return the default value