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

[data] add flag to skip get_object_locations for metrics #39884

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

Zandew
Copy link
Contributor

@Zandew Zandew commented Sep 27, 2023

Why are these changes needed?

Adds the flag ENABLE_GET_OBJECT_LOCATIONS_FOR_METRICS to DataContext.

If set, this flag skips the get_object_locations call if the result is used only for metrics.

Related issue number

Closes #39596

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 :(

Andrew Xue added 2 commits September 26, 2023 15:22
Signed-off-by: Andrew Xue <andrewxue@anyscale.com>
Signed-off-by: Andrew Xue <andrewxue@anyscale.com>
@Zandew Zandew changed the title Enable metrics flag [data] put get_object_locations behind metrics flag Sep 27, 2023
Signed-off-by: Andrew Xue <andrewxue@anyscale.com>
# If this is for purely metrics use, we can skip the call for performance.
if (
skip_get_locations
and not ray.data.context.DataContext.get_current().enable_get_object_locations_for_metrics
Copy link
Contributor

Choose a reason for hiding this comment

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

this function is supposed to be used by all Ray libs, not only Data. So let's not add data-specific logic here.
I guess we don't need to touch this function at all. We can just skip calling it in Data code.

@raulchen
Copy link
Contributor

@Zandew @scottjlee btw, do you know why this is causing failures now? what changed?

@Zandew
Copy link
Contributor Author

Zandew commented Sep 27, 2023

@Zandew @scottjlee btw, do you know why this is causing failures now? what changed?

It may be the additional calls to get_object_locations that cause the tests to timeout

Signed-off-by: Andrew Xue <andrewxue@anyscale.com>
@Zandew Zandew changed the title [data] put get_object_locations behind metrics flag [data] add flag to skip get_object_locations for metrics Sep 27, 2023
Signed-off-by: Andrew Xue <andrewxue@anyscale.com>
@raulchen raulchen merged commit 535e626 into ray-project:master Sep 27, 2023
45 of 48 checks passed
vymao pushed a commit to vymao/ray that referenced this pull request Oct 11, 2023
…#39884)

Adds the flag `ENABLE_GET_OBJECT_LOCATIONS_FOR_METRICS` to `DataContext`.

If set, this flag skips the `get_object_locations` call if the result is used only for metrics.

---------

Signed-off-by: Andrew Xue <andrewxue@anyscale.com>
Signed-off-by: Victor <vctr.y.m@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data] Add ability to disable stats collection
4 participants