Manmay Nakhashi commited on
Commit
f9cfdad
·
1 Parent(s): 4245361

Pin pydantic==2.10.6 — root cause of the recurring bool-iter crash

Browse files

The error in /usr/local/lib/python3.10/site-packages/gradio_client/utils.py
('if "const" in schema' against a bool) is independent of gradio version
(reproduced on both 4.44.1 and 5.7.1, just at different line numbers).

The trigger is pydantic 2.11+ emitting JSON schemas with the bool
shorthand 'additionalProperties: True' which gradio_client's get_type
can't iterate. Pydantic 2.10.6 still emits the dict form
'additionalProperties: {}', which works.

Confirmed perth is NOT pulling conflicting versions: it only requires
audio/ML libs (librosa, numpy, pandas, torch>=2.1.0, etc.) — none of
the pydantic/gradio/fastapi/starlette stack.

Files changed (1) hide show
  1. requirements.txt +5 -0
requirements.txt CHANGED
@@ -1,5 +1,10 @@
1
  torch==2.4.0
2
  torchaudio==2.4.0
 
 
 
 
 
3
  safetensors>=0.4.0
4
  accelerate>=0.25.0
5
  peft>=0.7.0
 
1
  torch==2.4.0
2
  torchaudio==2.4.0
3
+ # pydantic 2.11+ emits bool-shorthand `additionalProperties: True` which crashes
4
+ # gradio_client's get_type (`if "const" in schema`). 2.10.6 is the last version
5
+ # that still emits the dict form. Tracked at:
6
+ # https://discuss.huggingface.co/t/154601
7
+ pydantic==2.10.6
8
  safetensors>=0.4.0
9
  accelerate>=0.25.0
10
  peft>=0.7.0