Skip to content

Commit

Permalink
library update and pydantic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaansehgal99 committed May 13, 2024
1 parent 52f5d3b commit c488aff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions presets/inference/text-generation/inference_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ class GenerateKwargs(BaseModel):
pad_token_id: Optional[int] = tokenizer.pad_token_id
eos_token_id: Optional[int] = tokenizer.eos_token_id
class Config:
extra = Extra.allow # Allows for additional fields not explicitly defined
schema_extra = {
extra = 'allow' # Allows for additional fields not explicitly defined
json_schema_extra = {
"example": {
"max_length": 200,
"temperature": 0.7,
Expand Down
24 changes: 15 additions & 9 deletions presets/inference/text-generation/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Dependencies for TFS
transformers==4.37.2

# Core dependencies
transformers==4.40.2
torch==2.2.0
accelerate==0.23.0
fastapi==0.109.1
pydantic==1.10.9
uvicorn[standard]==0.23.2
accelerate==0.30.1
fastapi>=0.111.0,<0.112.0 # Allow patch updates
pydantic>=2.7.1,<2.8 # Allow patch updates
uvicorn[standard]>=0.29.0,<0.30.0 # Allow patch updates

# Utility libraries
bitsandbytes==0.42.0
deepspeed==0.11.1
gputil==1.4.0
psutil==5.9.8

# Less critical, can be latest
gputil
psutil
# For UTs
pytest==8.0.0
httpx==0.26.0
pytest
httpx

0 comments on commit c488aff

Please sign in to comment.