-
Notifications
You must be signed in to change notification settings - Fork 822
[History Server] Poll Serve, placement group, and Ray Data endpoints by default #5093
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
Open
Future-Outlier
wants to merge
12
commits into
ray-project:master
Choose a base branch
from
Future-Outlier:collector-builtin-endpoints
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,795
−200
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
54251e8
[History Server] Poll Serve, placement group, and Ray Data endpoints …
Future-Outlier 34e5a50
[Fix] Use events.NewFakeRecorder in rayservice suspend unit test
Future-Outlier 29d5088
[History Server] Mirror live Serve state and stop polling at shutdown
Future-Outlier df8f4bf
update
Future-Outlier 16f6b8a
upd
Future-Outlier bff31de
[History Server] Bound the shutdown join and fix e2e port-forward leak
Future-Outlier 010acca
Merge remote-tracking branch 'origin/master' into collector-builtin-e…
Future-Outlier 17626bc
[History Server] Address review comments on collector polling
Future-Outlier 697ed1c
Trigger CI
Future-Outlier 1092d70
Address endpoint polling review feedback
Future-Outlier c182988
Merge upstream master into collector-builtin-endpoints
Future-Outlier f4f0c84
Set RayService collector poll interval to 30s
Future-Outlier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| apiVersion: ray.io/v1 | ||
| kind: RayJob | ||
| metadata: | ||
| name: rayjob-ray-data | ||
| spec: | ||
| # Self-contained: brings up its own cluster; also exercises the collector's shutdown path. | ||
| shutdownAfterJobFinishes: true | ||
| # Long enough for one polling cycle after the job succeeds. | ||
| ttlSecondsAfterFinished: 30 | ||
| entrypoint: | | ||
| python -c " | ||
| import ray | ||
| ray.init() | ||
|
|
||
| # materialize() is required: an unexecuted Dataset produces no stats. | ||
| ds = ray.data.range(100).map_batches(lambda batch: batch).materialize() | ||
| print(f'Dataset rows: {ds.count()}') | ||
| " | ||
| rayClusterSpec: | ||
| # Head-only: worker collectors would need the generated head Service FQDN in FQ_RAY_IP. | ||
| headGroupSpec: | ||
| rayStartParams: | ||
| dashboard-host: 0.0.0.0 | ||
| serviceType: ClusterIP | ||
| template: | ||
| spec: | ||
| containers: | ||
| - env: | ||
| - name: RAY_TMP_ROOT | ||
| value: &rayTmpRoot /tmp/ray | ||
| - name: RAY_enable_ray_event | ||
| value: "true" | ||
| - name: RAY_enable_core_worker_ray_event_to_aggregator | ||
| value: "true" | ||
| - name: RAY_DASHBOARD_AGGREGATOR_AGENT_EVENTS_EXPORT_ADDR | ||
| value: "http://localhost:8084/v1/events" | ||
| - name: RAY_DASHBOARD_AGGREGATOR_AGENT_EXPOSABLE_EVENT_TYPES | ||
| value: "ALL" | ||
| image: rayproject/ray:2.56.0 | ||
| imagePullPolicy: IfNotPresent | ||
| name: ray-head | ||
| securityContext: | ||
| allowPrivilegeEscalation: true | ||
| privileged: true | ||
| resources: | ||
| limits: | ||
| cpu: "5" | ||
| memory: 10G | ||
| requests: | ||
| cpu: "50m" | ||
| memory: 1G | ||
| volumeMounts: | ||
| - name: historyserver | ||
| mountPath: *rayTmpRoot | ||
| - name: collector | ||
| image: collector:v0.1.0 | ||
| imagePullPolicy: IfNotPresent | ||
| env: | ||
| - name: POD_IP | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: status.podIP | ||
| # KubeRay generates the cluster name; read it back from the pod label. | ||
| - name: RAY_CLUSTER_NAME | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.labels['ray.io/cluster'] | ||
| - name: RAY_CLUSTER_NAMESPACE | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.namespace | ||
| # ray.io/originated-from-* labels are on the RayCluster, not the pod; must match metadata.name. | ||
| - name: OWNER_KIND | ||
| value: "RayJob" | ||
| - name: OWNER_NAME | ||
| value: "rayjob-ray-data" | ||
| # Only used to look up this pod's Ray NodeID; the dashboard is in this pod. | ||
| - name: FQ_RAY_IP | ||
| value: "localhost" | ||
| - name: RAY_TMP_ROOT | ||
| value: *rayTmpRoot | ||
| # Shorter than the 30s default so a cycle fits inside ttlSecondsAfterFinished. | ||
| - name: RAY_COLLECTOR_POLL_INTERVAL | ||
| value: "5s" | ||
| - name: S3DISABLE_SSL | ||
| value: "true" | ||
| - name: AWS_ACCESS_KEY_ID | ||
| value: minioadmin | ||
| - name: AWS_SECRET_ACCESS_KEY | ||
| value: minioadmin | ||
| - name: AWS_SESSION_TOKEN | ||
| value: "" | ||
| - name: S3_BUCKET | ||
| value: "ray-historyserver" | ||
| - name: S3_ENDPOINT | ||
| value: "minio-service.minio-dev:9000" | ||
| - name: S3_REGION | ||
| value: "test" | ||
| - name: S3FORCE_PATH_STYLE | ||
| value: "true" | ||
| command: | ||
| - collector | ||
| - --role=Head | ||
| - --runtime-class-name=s3 | ||
| - --ray-root-dir=log | ||
| - --events-port=8084 | ||
| volumeMounts: | ||
| - name: historyserver | ||
| mountPath: *rayTmpRoot | ||
| volumes: | ||
| - name: historyserver | ||
| emptyDir: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| apiVersion: ray.io/v1 | ||
| kind: RayService | ||
| metadata: | ||
| name: rayservice-historyserver | ||
| spec: | ||
| serveConfigV2: | | ||
| proxy_location: EveryNode | ||
| applications: | ||
| - name: history-e2e | ||
| route_prefix: / | ||
| import_path: microbenchmarks.no_ops:app_builder | ||
| args: | ||
| num_forwards: 0 | ||
| runtime_env: | ||
| working_dir: https://github.com/ray-project/serve_workloads/archive/a9f184f4d9ddb7f9a578502ae106470f87a702ef.zip | ||
| deployments: | ||
| - name: NoOp | ||
| num_replicas: 1 | ||
| ray_actor_options: | ||
| num_cpus: 0.5 | ||
| rayClusterConfig: | ||
| # Head-only: worker collectors would need the generated head Service FQDN in FQ_RAY_IP. | ||
| headGroupSpec: | ||
| rayStartParams: | ||
| dashboard-host: 0.0.0.0 | ||
| serviceType: ClusterIP | ||
| template: | ||
| spec: | ||
| containers: | ||
| - env: | ||
| - name: RAY_TMP_ROOT | ||
| value: &rayTmpRoot /tmp/ray | ||
| - name: RAY_enable_ray_event | ||
| value: "true" | ||
| - name: RAY_enable_core_worker_ray_event_to_aggregator | ||
| value: "true" | ||
| - name: RAY_DASHBOARD_AGGREGATOR_AGENT_EVENTS_EXPORT_ADDR | ||
| value: "http://localhost:8084/v1/events" | ||
| # in ray 2.52.0, we need to set RAY_DASHBOARD_AGGREGATOR_AGENT_EXPOSABLE_EVENT_TYPES | ||
| # in ray 2.53.0 (noy yet done). we need to set RAY_DASHBOARD_AGGREGATOR_AGENT_PUBLISHER_HTTP_ENDPOINT_EXPOSABLE_EVENT_TYPES | ||
| - name: RAY_DASHBOARD_AGGREGATOR_AGENT_EXPOSABLE_EVENT_TYPES | ||
| value: "TASK_DEFINITION_EVENT,TASK_LIFECYCLE_EVENT,ACTOR_TASK_DEFINITION_EVENT, | ||
| TASK_PROFILE_EVENT,DRIVER_JOB_DEFINITION_EVENT,DRIVER_JOB_LIFECYCLE_EVENT, | ||
| ACTOR_DEFINITION_EVENT,ACTOR_LIFECYCLE_EVENT,NODE_DEFINITION_EVENT,NODE_LIFECYCLE_EVENT" | ||
| image: rayproject/ray:2.52.0 | ||
| imagePullPolicy: IfNotPresent | ||
| name: ray-head | ||
| securityContext: | ||
| allowPrivilegeEscalation: true | ||
| privileged: true | ||
| ports: | ||
| - containerPort: 6379 | ||
| name: gcs-server | ||
| - containerPort: 8265 | ||
| name: dashboard | ||
| - containerPort: 10001 | ||
| name: client | ||
| - containerPort: 8000 | ||
| name: serve | ||
| resources: | ||
| limits: | ||
| cpu: "5" | ||
| memory: 10G | ||
| requests: | ||
| cpu: "50m" | ||
| memory: 1G | ||
| volumeMounts: | ||
| - name: historyserver | ||
| mountPath: *rayTmpRoot | ||
| - name: collector | ||
| image: collector:v0.1.0 | ||
| imagePullPolicy: IfNotPresent | ||
| env: | ||
| - name: POD_IP | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: status.podIP | ||
| # KubeRay generates the cluster name; read it back from the pod label. | ||
| - name: RAY_CLUSTER_NAME | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.labels['ray.io/cluster'] | ||
| - name: RAY_CLUSTER_NAMESPACE | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.namespace | ||
| # ray.io/originated-from-* labels are on the RayCluster, not the pod; must match metadata.name. | ||
| - name: OWNER_KIND | ||
| value: "RayService" | ||
| - name: OWNER_NAME | ||
| value: "rayservice-historyserver" | ||
| # Only used to look up this pod's Ray NodeID; the dashboard is in this pod. | ||
| - name: FQ_RAY_IP | ||
| value: "localhost" | ||
| - name: RAY_TMP_ROOT | ||
| value: *rayTmpRoot | ||
|
Future-Outlier marked this conversation as resolved.
|
||
| - name: S3DISABLE_SSL | ||
| value: "true" | ||
| - name: AWS_ACCESS_KEY_ID | ||
| value: minioadmin | ||
| - name: AWS_SECRET_ACCESS_KEY | ||
| value: minioadmin | ||
| - name: AWS_SESSION_TOKEN | ||
| value: "" | ||
| - name: S3_BUCKET | ||
| value: "ray-historyserver" | ||
| - name: S3_ENDPOINT | ||
| value: "minio-service.minio-dev:9000" | ||
| - name: S3_REGION | ||
| value: "test" | ||
| - name: S3FORCE_PATH_STYLE | ||
| value: "true" | ||
| - name: RAY_COLLECTOR_POLL_INTERVAL | ||
| value: "30s" | ||
| command: | ||
| - collector | ||
| - --role=Head | ||
| - --runtime-class-name=s3 | ||
| - --ray-root-dir=log | ||
| - --events-port=8084 | ||
| volumeMounts: | ||
| - name: historyserver | ||
| mountPath: *rayTmpRoot | ||
| volumes: | ||
| - name: historyserver | ||
| emptyDir: {} | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.