Cursor Agent commited on
Commit
2c47f87
·
1 Parent(s): a930d30

fix: pin numpy<2 and pyarrow for runtime compatibility

Browse files

CRITICAL RUNTIME FIXES:
1. NumPy 2.x Incompatibility:
- torch 2.1.0 compiled with NumPy 1.x
- NumPy 2.2.6 was auto-installed causing crash
- Solution: Pin numpy<2.0.0

2. PyArrow Incompatibility:
- datasets 2.14.5 needs PyExtensionType
- Latest pyarrow removed this attribute
- Solution: Pin pyarrow>=12.0.0,<15.0.0

Errors fixed:
- "module compiled using NumPy 1.x cannot run in NumPy 2.x"
- "module 'pyarrow' has no attribute 'PyExtensionType'"

App should now start successfully.

Files changed (1) hide show
  1. requirements.txt +4 -1
requirements.txt CHANGED
@@ -59,4 +59,7 @@ passlib[bcrypt]==1.7.4
59
  --extra-index-url https://download.pytorch.org/whl/cpu
60
  torch==2.1.0+cpu
61
  transformers==4.35.0
62
- # numpy is auto-installed with pandas
 
 
 
 
59
  --extra-index-url https://download.pytorch.org/whl/cpu
60
  torch==2.1.0+cpu
61
  transformers==4.35.0
62
+ # CRITICAL: Pin numpy<2 for compatibility with compiled modules
63
+ numpy<2.0.0 # Prevent NumPy 2.x which breaks torch/transformers
64
+ # CRITICAL: Pin pyarrow for datasets 2.14.5 compatibility
65
+ pyarrow>=12.0.0,<15.0.0 # datasets 2.14.5 needs PyExtensionType from pyarrow 12-14