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

Change Dataset's repr to use angled brackets #31947

Closed
wants to merge 7 commits into from
Closed

Change Dataset's repr to use angled brackets #31947

wants to merge 7 commits into from

Conversation

feefs
Copy link

@feefs feefs commented Jan 26, 2023

Why are these changes needed?

This PR updates Dataset's __repr()__ to use angled brackets. Since the repr of a Dataset doesn't contain the values, eval(repr(...)) of a Dataset clearly doesn't yield an object with the same value. Therefore, it should be using angled brackets according to the official python docs https://docs.python.org/3/library/functions.html#repr

Related issue number

This addresses #28178, and is related to #31604

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

@feefs feefs changed the title Angled brackets dataset Change Dataset's repr to use angled brackets Jan 26, 2023
@feefs
Copy link
Author

feefs commented Jan 26, 2023

Screenshot 2023-01-25 at 17 17 57

Changed unit tests are passing locally, and it looks correct in a small example.

@feefs
Copy link
Author

feefs commented Jan 26, 2023

I wanted to get a review from only @bveeramani, but I couldn't change the reviewers. Sorry for the spam :)

Not sure if the regex find and replace I did covers the third checkbox for "including any doc changes". I'll wait for the CI test results before touching the fourth checkbox.

@bveeramani I also noticed while editing that DatasetPipeline is in a similar situation, should it be tackled as well?

Signed-off-by: feefs <feefs@berkeley.edu>
Signed-off-by: feefs <feefs@berkeley.edu>
Signed-off-by: feefs <feefs@berkeley.edu>
Signed-off-by: feefs <feefs@berkeley.edu>
Signed-off-by: feefs <feefs@berkeley.edu>
Signed-off-by: feefs <feefs@berkeley.edu>
Signed-off-by: feefs <feefs@berkeley.edu>
@feefs feefs closed this Mar 3, 2023
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.

None yet

1 participant