Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Serve] Metric ray_serve_controller_num_starts doesn't show up #43829

Closed
architkulkarni opened this issue Mar 8, 2024 · 1 comment · Fixed by #43885
Closed

[Serve] Metric ray_serve_controller_num_starts doesn't show up #43829

architkulkarni opened this issue Mar 8, 2024 · 1 comment · Fixed by #43885
Assignees
Labels
bug Something that is supposed to be working; but isn't P1 Issue that should be fixed within a few weeks serve Ray Serve Related Issue

Comments

@architkulkarni
Copy link
Contributor

What happened + What you expected to happen

  1. Start Ray with ray start --head
  2. Run the Ray Serve quickstart in ipython (leaving the script open)
import requests
from starlette.requests import Request
from typing import Dict

from ray import serve


# 1: Define a Ray Serve application.
@serve.deployment
class MyModelDeployment:
    def __init__(self, msg: str):
        # Initialize model state: could be very large neural net weights.
        self._msg = msg

    def __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!'}
  1. 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.
  2. 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.

@architkulkarni 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
@edoakes
Copy link
Contributor

edoakes commented Mar 8, 2024

@shrekris-anyscale PTAL

@GeneDer 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't P1 Issue that should be fixed within a few weeks serve Ray Serve Related Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants