ming Claude commited on
Commit
d2cdf90
·
1 Parent(s): fdb8925

Fix Outlines library version pinning for V4 API compatibility

Browse files

Problem:
- requirements.txt allowed any Outlines version >=0.0.34
- Latest version (1.2.9) has breaking API changes
- V4 code uses old API: outlines.generate.json()
- New API has no generate module, causing import failures

Solution:
- Pin to outlines>=0.0.34,<0.1.0
- Ensures old API compatibility
- Prevents automatic upgrade to 1.x versions

Tested:
- Version 0.0.44 confirmed working locally
- Has outlines.generate.json() method
- Compatible with existing V4 code

This fix will enable V4 JSON streaming endpoint on HuggingFace Spaces.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. requirements.txt +1 -1
requirements.txt CHANGED
@@ -20,7 +20,7 @@ accelerate>=0.33.0,<1.0.0 # Required for GPU quantization (V4)
20
  bitsandbytes>=0.44.0 # 4-bit NF4 quantization for GPU (V4)
21
  einops>=0.6.0,<1.0.0 # Required for model architecture (V4)
22
  scipy>=1.10.0,<2.0.0 # Often needed for unquantized models (V4)
23
- outlines>=0.0.34 # JSON schema enforcement for V4 structured summarization (requires Python 3.10+)
24
 
25
  # Testing
26
  pytest>=7.0.0,<8.0.0
 
20
  bitsandbytes>=0.44.0 # 4-bit NF4 quantization for GPU (V4)
21
  einops>=0.6.0,<1.0.0 # Required for model architecture (V4)
22
  scipy>=1.10.0,<2.0.0 # Often needed for unquantized models (V4)
23
+ outlines>=0.0.34,<0.1.0 # JSON schema enforcement for V4 structured summarization (requires Python 3.10+, pin to 0.0.x for API compatibility)
24
 
25
  # Testing
26
  pytest>=7.0.0,<8.0.0