From af8437095aca35f691ec20ea495ac5189d6dd455 Mon Sep 17 00:00:00 2001 From: Yaowei Zheng Date: Sun, 5 Oct 2025 02:18:30 +0800 Subject: [PATCH] [ci] Change macOS version (#9229) --- .github/workflows/tests.yml | 9 +++++---- requirements.txt | 5 +++-- src/llamafactory/extras/misc.py | 4 ++-- tests/data/test_mm_plugin.py | 2 +- tests/version.txt | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e7cdddad..4e960c5a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,7 @@ jobs: os: - "ubuntu-latest" - "windows-latest" - - "macos-13" + - "macos-latest" transformers: - null include: # test backward compatibility @@ -75,10 +75,11 @@ jobs: run: | python -m pip install "transformers==${{ matrix.transformers }}" - - name: Install transformers to avoid mac os ci errors - if: ${{ matrix.os == 'macos-13' }} + - name: Update accelerate to avoid mac os ci errors (before accelerate 1.11.0) + if: ${{ matrix.os == 'macos-latest' }} run: | - python -m pip install "transformers<=4.51.3" + python -m pip uninstall -y accelerate + python -m pip install "git+https://github.com/huggingface/accelerate.git" - name: Cache files id: hf-hub-cache diff --git a/requirements.txt b/requirements.txt index 424cc643..79ac7c6c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,8 @@ # core deps -transformers>=4.49.0,<=4.56.2,!=4.52.0 +transformers>=4.49.0,<=4.56.2,!=4.52.0; python_version < '3.10' +transformers>=4.49.0,<=4.57.0,!=4.52.0; python_version >= '3.10' datasets>=2.16.0,<=4.0.0 -accelerate>=1.3.0,<=1.10.1 +accelerate>=1.3.0,<=1.11.0 peft>=0.14.0,<=0.17.1 trl>=0.8.6,<=0.9.6 # gui diff --git a/src/llamafactory/extras/misc.py b/src/llamafactory/extras/misc.py index 4f1778ba..81bcdd94 100644 --- a/src/llamafactory/extras/misc.py +++ b/src/llamafactory/extras/misc.py @@ -94,9 +94,9 @@ def check_version(requirement: str, mandatory: bool = False) -> None: def check_dependencies() -> None: r"""Check the version of the required packages.""" - check_version("transformers>=4.49.0,<=4.56.2") + check_version("transformers>=4.49.0,<=4.57.0") check_version("datasets>=2.16.0,<=4.0.0") - check_version("accelerate>=1.3.0,<=1.10.1") + check_version("accelerate>=1.3.0,<=1.11.0") check_version("peft>=0.14.0,<=0.17.1") check_version("trl>=0.8.6,<=0.9.6") diff --git a/tests/data/test_mm_plugin.py b/tests/data/test_mm_plugin.py index 87281f7e..4b702e83 100644 --- a/tests/data/test_mm_plugin.py +++ b/tests/data/test_mm_plugin.py @@ -376,7 +376,7 @@ def test_qwen2_vl_plugin(): @pytest.mark.skipif(not is_transformers_version_greater_than("4.57.0"), reason="Requires transformers>=4.57.0") def test_qwen3_vl_plugin(): frame_seqlen = 1 - tokenizer_module = _load_tokenizer_module(model_name_or_path="Qwen/Qwen3-VL-235B-A22B-Instruct") + tokenizer_module = _load_tokenizer_module(model_name_or_path="Qwen/Qwen3-VL-30B-A3B-Instruct") qwen3_vl_plugin = get_mm_plugin(name="qwen3_vl", video_token="<|video_pad|>") check_inputs = {"plugin": qwen3_vl_plugin, **tokenizer_module} check_inputs["expected_mm_messages"] = [ diff --git a/tests/version.txt b/tests/version.txt index 51a3a7c1..be83783e 100644 --- a/tests/version.txt +++ b/tests/version.txt @@ -1,2 +1,2 @@ # change if test fails or cache is outdated -0.9.4.102 +0.9.4.103