Skip to content

fix grafana dashboards dropdowns for data and train dashboard #52752

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
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alanwguo
Copy link
Contributor

@alanwguo alanwguo commented May 2, 2025

Why are these changes needed?

Previously the dropdown for variables for data and train dashboard wasn't working for a few reasons:

  • Data dashboard used the ray_data_allocated_bytes metric which doesn't seem to be guaranteed metric to be emitted when ray data is used
  • Both data and train dashboard used label_values which only shows values for live metrics. Since these variables represent entities that are expected to stop emitting metrics over time, I changed to use a query that checks for any values over the time range selected based on the approach suggested here

Screenshot 2025-05-02 at 12 47 36 PM
Screenshot 2025-05-02 at 12 47 44 PM

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Copy link
Contributor

@matthewdeng matthewdeng left a comment

Choose a reason for hiding this comment

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

Thank you!

@@ -75,7 +75,7 @@
"selected": false
},
"datasource": "${datasource}",
"definition": "label_values(ray_train_report_total_blocked_time_s{{{global_filters}}}, ray_train_run_name)",
"definition": "query_result(count by (ray_train_run_name)(last_over_time(ray_train_report_total_blocked_time_s{{SessionName=~\"$SessionName\",{global_filters}}}[$__range])))",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be ray_train_run_name instead of SessionName=~\"$SessionName\"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, this is right. THis is filtering the dropdown to only show train run names that are part of the selected Session.

@@ -85,11 +85,11 @@
"name": "TrainRunName",
"options": [],
"query": {
"query": "label_values(ray_train_report_total_blocked_time_s{{{global_filters}}}, ray_train_run_name)",
"query": "query_result(count by (ray_train_run_name)(last_over_time(ray_train_report_total_blocked_time_s{{SessionName=~\"$SessionName\",{global_filters}}}[$__range])))",
Copy link
Contributor

Choose a reason for hiding this comment

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

I realized that ray_train_report_total_blocked_time_s may not be recorded in the case that the user does not call ray.train.report. Would it be better to use a metric that will always be recorded? E.g. right now ray_train_worker_group_start_total_time_s should always be there.

Signed-off-by: Alan Guo <[email protected]>
@alanwguo alanwguo added the go add ONLY when ready to merge, run all tests label May 2, 2025
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