zziang commited on
Commit
117bd84
·
verified ·
1 Parent(s): e5d9366

director: resolve transformers5 + hub1 in one pip pass

Browse files
Files changed (1) hide show
  1. kaggle/notebook_director.py +4 -2
kaggle/notebook_director.py CHANGED
@@ -15,8 +15,10 @@ def sh(cmd: str) -> None:
15
 
16
 
17
  def main() -> None:
18
- sh("pip install -q huggingface_hub")
19
- sh("pip install -q --upgrade 'transformers>=5' accelerate")
 
 
20
 
21
  import transformers
22
  print("transformers", transformers.__version__, flush=True)
 
15
 
16
 
17
  def main() -> None:
18
+ # One resolver pass: transformers 5 expects a newer huggingface_hub than the
19
+ # image ships, and installing them separately leaves `httpx` missing from
20
+ # huggingface_hub.utils.
21
+ sh("pip install -q --upgrade 'transformers>=5' 'huggingface_hub>=1.0' accelerate")
22
 
23
  import transformers
24
  print("transformers", transformers.__version__, flush=True)