You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the Ray Serve quickstart in ipython (leaving the script open)
importrequestsfromstarlette.requestsimportRequestfromtypingimportDictfromrayimportserve# 1: Define a Ray Serve application.@serve.deploymentclassMyModelDeployment:
def__init__(self, msg: str):
# Initialize model state: could be very large neural net weights.self._msg=msgdef__call__(self, request: Request) ->Dict:
return {"result": self._msg}
app=MyModelDeployment.bind(msg="Hello world!")
# 2: Deploy the application locally.serve.run(app, route_prefix="/")
# 3: Query the application and print the result.print(requests.get("http://localhost:8000/").json())
# {'result': 'Hello world!'}
Inspect the metrics at http://localhost:57482/, or whatever port is specified in /tmp/ray/prom_metrics_service_discovery.json. If you search for num_starts there are no results, despite the fact that other Serve metrics appear to be there such as ray_serve_controller_num_control_loops.
The problem persists after killing the Serve controller with ray.kill(ray.get_actor("SERVE_CONTROLLER_ACTOR")) and rerunning the quickstart code in the same ipython session.
Versions / Dependencies
master
Reproduction script
above
Issue Severity
Medium: It is a significant difficulty but I can work around it.
The text was updated successfully, but these errors were encountered:
architkulkarni
added
bug
Something that is supposed to be working; but isn't
triage
Needs triage (eg: priority, bug/not-bug, and owning component)
serve
Ray Serve Related Issue
labels
Mar 8, 2024
GeneDer
added
P1
Issue that should be fixed within a few weeks
and removed
triage
Needs triage (eg: priority, bug/not-bug, and owning component)
labels
Mar 8, 2024
What happened + What you expected to happen
ray start --head
http://localhost:57482/
, or whatever port is specified in/tmp/ray/prom_metrics_service_discovery.json
. If you search fornum_starts
there are no results, despite the fact that other Serve metrics appear to be there such asray_serve_controller_num_control_loops
.ray.kill(ray.get_actor("SERVE_CONTROLLER_ACTOR"))
and rerunning the quickstart code in the same ipython session.Versions / Dependencies
master
Reproduction script
above
Issue Severity
Medium: It is a significant difficulty but I can work around it.
The text was updated successfully, but these errors were encountered: