-
Notifications
You must be signed in to change notification settings - Fork 698
[History Server][Feat] Add metadata collect logic #4431
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
popojk
wants to merge
25
commits into
ray-project:master
Choose a base branch
from
popojk:add_metadata_write_logic_in_history_server
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.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
3d9bae4
add meta file
popojk f2633bf
add metadata collect logic
popojk a119251
add dataset collect logic
popojk a620950
minor fix
popojk 896d996
add MetaKeyInfo helper for metadata retrieval.
fweilun 40fd1fd
Merge branch 'master' into add_metadata_write_logic_in_history_server
fweilun e478fa9
nit fix
popojk 97a442d
Merge remote-tracking branch 'origin/add_metadata_write_logic_in_hist…
popojk f91d13f
refactor
popojk f8ce56e
check nil for MetaKeyInfo function
fweilun 1ed1ea0
correct MetaKeyInfo path.
fweilun 1c1c361
fix potential meta collector bug
popojk 688c3eb
Merge remote-tracking branch 'origin/add_metadata_write_logic_in_hist…
popojk 750d7a8
refactor meta.go code
popojk 1f665f6
add meta collect enable and dashboard url envvar
popojk 0f34112
fix url info cache issue
popojk 6e1ce62
fix e2e test error
popojk e58dae8
resolve conflict
popojk a2b9fc8
fix meta collect enable logic
popojk 89db5fd
add demo script
popojk 2c49cd6
add enable meta collect config to ray cluster yaml
popojk d603e09
resolve conflict
popojk aadca4b
add rayservice test yaml
popojk 3536abe
Merge branch 'master' into add_metadata_write_logic_in_history_server
400Ping a5cd2a0
fix ci error
400Ping 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
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,48 @@ | ||
| # RayJob that demonstrates endpoints used by the "persist metadata" workaround: | ||
| # - Placement groups (api/v0/placement_groups) | ||
| # - Datasets (api/jobs/ + api/data/datasets/{job_id}) | ||
| # | ||
| # Use this with the History Server setup guide (Step 6). Ensure the collector | ||
| # has SUPPORT_RAY_EVENT_UNSUPPORTED_DATA enabled so it persists these to blob storage. | ||
| # After the job runs, you can view the data in Ray Dashboard, and after cluster | ||
| # teardown, via History Server (from persisted meta). | ||
| # | ||
| # Note: RayJob connects to the RayCluster created by RayService above via clusterSelector | ||
| # | ||
| apiVersion: ray.io/v1 | ||
| kind: RayJob | ||
| metadata: | ||
| name: rayjob-workaround | ||
| spec: | ||
| entrypoint: | | ||
| python -c " | ||
| import ray | ||
| import time | ||
|
|
||
| ray.init() | ||
|
|
||
| # --- 1. Placement group (visible under api/v0/placement_groups) --- | ||
| pg = ray.util.placement_group( | ||
| name='workaround_pg', | ||
| strategy='PACK', | ||
| bundles=[{'CPU': 0.2}] | ||
| ) | ||
| ray.get(pg.ready()) | ||
| print('Placement group created:', pg.id.hex()) | ||
|
|
||
| # --- 2. Dataset (creates job + dataset; visible under api/jobs/ and api/data/datasets/) --- | ||
| ds = ray.data.range(10) | ||
| n = ds.count() | ||
| print('Dataset created, count:', n) | ||
|
|
||
| # Keep running so the collector can poll Dashboard API and persist meta (e.g. every 5s). | ||
| # Wait long enough for at least one full persist cycle. | ||
| print('Waiting 15s for collector to persist metadata...') | ||
| time.sleep(15) | ||
|
|
||
| # Align with existing guide: allow events to be sent before shutdown. | ||
| time.sleep(5) | ||
| print('Done.') | ||
| " | ||
| clusterSelector: | ||
| ray.io/cluster: raycluster-historyserver |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worker nodes panic when RAY_DASHBOARD_ADDRESS is unset
Medium Severity
The collector unconditionally panics if
RAY_DASHBOARD_ADDRESSis not set, regardless of node role. However, the dashboard address is only needed whenSupportRayEventUnSupportDatais enabled, which only applies to Head nodes. Worker nodes will crash unnecessarily if this environment variable is missing, even though they never use it for metadata collection.