Skip to content

Commit

Permalink
[Docs] [Serve] remove unused json resolver (ray-project#33104)
Browse files Browse the repository at this point in the history
Removes unused lines in serve example

Why?
In this example, there's already an imported json resolver from ray.serve.http_adapters import json_request such that these lines are unused.
  • Loading branch information
bewestphal authored Mar 8, 2023
1 parent c37e05e commit c4d9027
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions doc/source/serve/doc_code/production_fruit_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
from ray.serve.http_adapters import json_request

# These imports are used only for type hints:
from typing import Dict, List
from starlette.requests import Request
from typing import Dict


@serve.deployment(num_replicas=2)
Expand Down Expand Up @@ -88,10 +87,6 @@ def check_price(self, amount: float) -> float:
return self.price * amount


async def json_resolver(request: Request) -> List:
return await request.json()


with InputNode() as query:
fruit, amount = query[0], query[1]

Expand Down

0 comments on commit c4d9027

Please sign in to comment.