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 seed for read files #49129

Merged
merged 32 commits into from
Dec 17, 2024

Conversation

Bye-legumes
Copy link
Contributor

Why are these changes needed?

Close #46177

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

@Bye-legumes Bye-legumes requested a review from a team as a code owner December 6, 2024 17:13
Bye-legumes and others added 3 commits December 6, 2024 13:18
Signed-off-by: zhilong <[email protected]>
Signed-off-by: zhilong <[email protected]>
@xingyu-long
Copy link
Contributor

Hey @Bye-legumes, do we still need your another PR #46306? it seems this PR is doing similar thing, right?

cc @richardliaw

@Bye-legumes
Copy link
Contributor Author

Hey @Bye-legumes, do we still need your another PR #46306? it seems this PR is doing similar thing, right?

cc @richardliaw

HI, we dont need PR #46306 if this can be merged. This is the plan bveeramani mentioned that we use a fileshuffleconfig to unify the shuffle.

@xingyu-long
Copy link
Contributor

Hey @Bye-legumes, do we still need your another PR #46306? it seems this PR is doing similar thing, right?
cc @richardliaw

HI, we dont need PR #46306 if this can be merged. This is the plan bveeramani mentioned that we use a fileshuffleconfig to unify the shuffle.

Got it, maybe we can close the another one to avoid duplicate? thanks!

@Bye-legumes Bye-legumes mentioned this pull request Dec 11, 2024
5 tasks
@Bye-legumes
Copy link
Contributor Author

Hey @Bye-legumes, do we still need your another PR #46306? it seems this PR is doing similar thing, right?
cc @richardliaw

HI, we dont need PR #46306 if this can be merged. This is the plan bveeramani mentioned that we use a fileshuffleconfig to unify the shuffle.

Got it, maybe we can close the another one to avoid duplicate? thanks!

Closed!

python/ray/data/read_api.py Outdated Show resolved Hide resolved
@DeveloperAPI
@dataclass
class FileShuffleConfig:
"""Configuration for file shuffling."""
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a docstring example and arg description? Maybe something like:

# (Pseudocode. You'll need to make this actually run or CI will fail)
>>> import ray
>>> import FileShuffleConfig
>>> read_parquet(...., shuffle=FileShuffleConfig(seed=42))

Also, maybe add a ..note that even if you seed the file shuffling, you might still get a somewhat random row order since tasks complete in non-deterministic order.

python/ray/data/read_api.py Outdated Show resolved Hide resolved
python/ray/data/tests/test_file_based_datasource.py Outdated Show resolved Hide resolved
python/ray/data/tests/test_file_based_datasource.py Outdated Show resolved Hide resolved
python/ray/data/read_api.py Outdated Show resolved Hide resolved
python/ray/data/read_api.py Outdated Show resolved Hide resolved
Bye-legumes and others added 9 commits December 12, 2024 12:55
Co-authored-by: Balaji Veeramani <[email protected]>
Signed-off-by: zhilong <[email protected]>
Co-authored-by: Balaji Veeramani <[email protected]>
Signed-off-by: zhilong <[email protected]>
Co-authored-by: Balaji Veeramani <[email protected]>
Signed-off-by: zhilong <[email protected]>
Co-authored-by: Balaji Veeramani <[email protected]>
Signed-off-by: zhilong <[email protected]>
Signed-off-by: zhilong <[email protected]>
Signed-off-by: zhilong <[email protected]>
Signed-off-by: zhilong <[email protected]>
Signed-off-by: zhilong <[email protected]>
Bye-legumes and others added 8 commits December 12, 2024 15:30
Signed-off-by: zhilong <[email protected]>
Signed-off-by: zhilong <[email protected]>
Signed-off-by: zhilong <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani bveeramani enabled auto-merge (squash) December 16, 2024 22:33
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Dec 16, 2024
Signed-off-by: Balaji Veeramani <[email protected]>
@github-actions github-actions bot disabled auto-merge December 16, 2024 23:12
Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani bveeramani merged commit e0c3da5 into ray-project:master Dec 17, 2024
5 checks passed
ujjawal-khare pushed a commit to ujjawal-khare-27/ray that referenced this pull request Dec 17, 2024
Close ray-project#46177

---------

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: zhilong <[email protected]>
Signed-off-by: zhilong <[email protected]>
Co-authored-by: Balaji Veeramani <[email protected]>
Signed-off-by: ujjawal-khare <[email protected]>
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.

[Data] read_parquet with shuffle="files" has not seed option
3 participants