-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[serve] Local testing mode doesn't support user_config #52051
Copy link
Copy link
Labels
P2Important issue, but not time-criticalImportant issue, but not time-criticalcommunity-backlogserveRay Serve Related IssueRay Serve Related Issue
Description
Running the following:
from typing import Any
from ray import serve
@serve.deployment(user_config={"name": "Ophir"})
class MostBasicIngress:
def __init__(self) -> None:
self.user_config = {"name": "Corey"}
async def reconfigure(self, user_config: dict[str, Any]) -> None:
print("Reconfiguring...")
self.user_config = user_config
async def __call__(self) -> str:
name = self.user_config["name"]
return f"Hello {name}!"
app = MostBasicIngress.bind()
handle = serve.run(app, _local_testing_mode=True)
print(handle.remote().result())
Prints:
INFO 2025-04-06 12:26:39,058 serve 91665 -- Initializing local replica class for Deployment(name='MostBasicIngress', app='default').
Hello Corey!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issue, but not time-criticalImportant issue, but not time-criticalcommunity-backlogserveRay Serve Related IssueRay Serve Related Issue