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

[core] Init DashboardHeadModules with a Config. #49479

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rynewang
Copy link
Contributor

Today we create DashboardHeadModules with a DashboardHead. In preparation to support Actor-based Heads, we need to use something serializable to create Heads.

Introducing a DashboardHeadModuleConfig class to keep all strings and ints a Head needs to start up. Lazily creates these non-serializable objects in the DashboardHeadModule base class:

  • gcs_client, gcs_aio_client
  • aiogrpc_gcs_channel
  • http_session

Note that gcs_client, gcs_aio_client will no longer be needed as well after we always do ray.init() in dashboard start up.

One exception is made for metrics, which is not serializable. Now we pass the metrics from DashboardHead to the Config and it's used only in MetricsHead. We can:

  1. keep MetricsHead a non-Actor Head forever, to emit metrics in the dashboard metrics export port, OR
  2. redefine DashboardMetricsAddress to be multiple values, and let each Head to export their own ports, OR
  3. redefine Dashboard metrics as Ray Application Level Metrics. This may need some tweaks in ray.util.metrics to make sure the Component is not core_worker but dashboard.

@rynewang rynewang added the go add ONLY when ready to merge, run all tests label Dec 28, 2024
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
@@ -59,7 +56,7 @@ async def get_cluster_id(self, req) -> aiohttp.web.Response:
return ray.dashboard.optional_utils.rest_response(
success=True,
message="Fetched cluster id",
cluster_id=self._dashboard_head.gcs_client.cluster_id.hex(),
cluster_id=self.gcs_client.cluster_id.hex(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UsageStatsHead has self.gcs_client?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants