[release] Fix huggingface_accelerate release test: floor peft>=0.18 for transformers 5.x - #65062
Open
elliot-barn wants to merge 1 commit into
Open
[release] Fix huggingface_accelerate release test: floor peft>=0.18 for transformers 5.x#65062elliot-barn wants to merge 1 commit into
elliot-barn wants to merge 1 commit into
Conversation
…or transformers 5.x The ray-ml base-extra-testdeps lock paired transformers==5.11.0 with peft==0.17.1 (pulled in transitively by lm_eval, unconstrained). peft 0.17.x unconditionally imports HybridCache from transformers at module import time, but transformers 5.x removed it, so any 'import transformers' path that touches trainer_utils crashes with ImportError: cannot import name 'HybridCache'. This broke the huggingface_accelerate release test at startup. Add a peft>=0.18 floor to the ml byod source requirements (0.18 made the HybridCache import lazy/guarded) and recompile the affected locks: the py3.10 ray-ml testdeps lock moves peft 0.17.1 -> 0.19.1; the py3.13 torchft lock was already on 0.19.1 and only picks up the annotation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the peft dependency requirement to >=0.18 in the BYOD ML requirements files (requirements_ml_byod_3.10.in and requirements_ml_byod_3.13.in) and updates the corresponding lockfiles. This change is made to prevent runtime import errors with transformers 5.x due to the removal of HybridCache in older peft versions (0.17.x). I have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
The
huggingface_acceleratenightly release test fails at startup with:Root cause: after the HuggingFace stack upgrade (#64054), the ray-ml
base-extra-testdeps lock pairs
transformers==5.11.0withpeft==0.17.1.pefthas no source pin — it is pulled in transitively bylm_eval— so uvleft it at a stale resolution. peft 0.17.x imports
HybridCachefromtransformers at module scope, but transformers 5.x removed that class, and
transformers'
trainer_utilsimports peft whenever it is installed, so anyimport transformerson the image crashes.Fix: add a
peft>=0.18floor (0.18 made theHybridCacheimport lazy andversion-guarded; verified 0.19.1 only references it inside a deferred
Gemma-specific code path) to the ml byod source requirements for both py3.10
and py3.13, and recompile the affected locks:
python/deplocks/base_extra_testdeps/ray-ml-base_extra_testdeps_py3.10.lock: peft 0.17.1 → 0.19.1 (no other resolution changes)release/ray_release/byod/ml_torchft_py3.13.lock: already resolved peft 0.19.1; only picks up the newviaannotationRelated issue number
N/A — nightly release-test failure (
huggingface_accelerate, Train tests group).Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR. (pre-commit hooks ran at commit time)Testing:
bazel run //ci/raydepsets:raydepsets -- build ci/raydepsets/configs/rayimg.depsets.yaml --name ray_ml_base_extra_testdeps_cuda_310and... build ci/raydepsets/configs/release_ml_torchft_tests.depsets.yaml(both compiled successfully; diffs are minimal as described above).peft/peft_model.pyno longer importsHybridCacheat module scope.huggingface_accelerate.AI assistance: this PR was prepared with AI assistance (Claude Code); I reviewed every changed line. Not a duplicate: searched open PRs for
peftandhuggingface_accelerate— no existing PR addresses this failure.🤖 Generated with Claude Code