Skip to content

Commit

Permalink
Merge pull request #2 from yudhiesh/fix-spelling
Browse files Browse the repository at this point in the history
fix spelling issue
  • Loading branch information
yudhiesh authored Oct 16, 2024
2 parents 6906ff5 + 8166034 commit adf3bba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion project/src/data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# NOTE: If you're using a different model ensure that you add in the Results and ModelResponse
# Pydantic models below!


class SimpleModelRequest(BaseModel):
review: str

Expand All @@ -20,7 +21,7 @@ def process_labels(cls, data: dict[int, float]) -> dict[str, float]:
return {LABEL_CLASS_TO_NAME[key]: value for key, value in data.items()}


class SimpleModelRespone(BaseModel):
class SimpleModelResponse(BaseModel):
label: SentimentLabel
score: float

Expand Down
4 changes: 2 additions & 2 deletions project/src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from ray import serve
from ray.serve.handle import DeploymentHandle

from src.data_models import SimpleModelRequest, SimpleModelRespone, SimpleModelResults
from src.data_models import SimpleModelRequest, SimpleModelResponse, SimpleModelResults
from src.model import Model

app = FastAPI(
Expand All @@ -28,7 +28,7 @@ def __init__(self, simple_model_handle: DeploymentHandle) -> None:
async def predict(self, request: SimpleModelRequest):
# TODO: Use the handle.predict which is a remote function
# to get the result
return SimpleModelRespone.model_validate(result.model_dump())
return SimpleModelResponse.model_validate(result.model_dump())


@serve.deployment(
Expand Down

0 comments on commit adf3bba

Please sign in to comment.