Hussein Claude Opus 5 (1M context) commited on
Commit
c9c3030
·
1 Parent(s): ef7b4bf

Declare a torchao floor so LoRA injection survives the Kaggle image

Browse files

The first real GPU run reached `get_peft_model` and died there:

ImportError: Found an incompatible version of torchao. Found version
0.10.0, but only versions above 0.16.0 are supported

PEFT's LoRA dispatcher calls `is_torchao_available()` while replacing each
target module, and that probe raises instead of returning False when an older
torchao is importable. Nothing in this project imports torchao; the Kaggle image
simply ships 0.10.0, which is enough to make every LoRA run fail. An absent
torchao is fine -- the probe returns False -- so this only bites images that
carry a stale one.

Reproduced locally against transformers 5.0.0 / peft 0.20.0 by installing
torchao 0.10.0: identical ImportError at the same dispatcher line. Upgrading to
0.18.0 and re-running completes the 2-step LoRA smoke with the same 294,912
trainable parameters as before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uis9uRynosX69gefzFQeNN

Files changed (1) hide show
  1. pyproject.toml +6 -0
pyproject.toml CHANGED
@@ -36,6 +36,12 @@ train = [
36
  "soundfile>=0.12,<1",
37
  "tensorboard>=2.18,<3",
38
  "torch>=2.4,<3",
 
 
 
 
 
 
39
  "transformers>=4.48,<6",
40
  ]
41
  dev = [
 
36
  "soundfile>=0.12,<1",
37
  "tensorboard>=2.18,<3",
38
  "torch>=2.4,<3",
39
+ # Not imported here. PEFT's LoRA dispatcher probes torchao for every module it
40
+ # replaces, and its probe raises rather than returning False when an older one
41
+ # is installed -- so an image shipping torchao 0.10 (Kaggle's) fails at
42
+ # get_peft_model with an ImportError. Declaring the floor is the only way to
43
+ # keep that path working.
44
+ "torchao>=0.16",
45
  "transformers>=4.48,<6",
46
  ]
47
  dev = [