-
Notifications
You must be signed in to change notification settings - Fork 3k
Remove scripts altogether #7592
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
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
Hi @lhoestq, If so, could you share the reason why? |
|
We stopped supporting dataset scripts altogether, whether they are based on GeneratorBasedBuilder or any other builder. This means you can't |
|
Ah, so only the from datasets import load_dataset_builder
builder = load_dataset_builder('cornell-movie-review-data/rotten_tomatoes')
builder.download_and_prepare() we can still load data using |
|
Can you give an example on how to upgrade from using |
|
For guys who dislike this change +1 |
…face/datasets#7592; changed MMLU to an up-to-date Parquet dataset repository and made the required changes to the module
here is a command to convert a script based dataset on HF to a Parquet dataset: And if you want to define a streaming pipeline, feel free to use the from datasets import load_dataset
ds = load_dataset(..., streaming=True) # source data
ds = ds.map(...) # preprocessing
ds = ds.filter(...) # remove bad samples
# For training
# data_loader = DataLoader(ds, ...)
# Saving the dataset
# ds.push_to_hub(...) |
## Why are these changes needed? Hugging Face Datasets v4.0.0 removed dataset scripts and the related “dynamic modules” mechanism (See huggingface/datasets#7592), so `datasets.load.init_dynamic_modules` no longer exists. As `ray.data._internal.datasource.huggingface_datasource` currently imports/calls this function unconditionally, it raises: ``` AttributeError: module 'datasets.load' has no attribute 'init_dynamic_modules' ``` With this PR, Ray detects the legacy initializer and only calls it on Datasets ≤3.x. On Datasets ≥4.0.0 the block becomes a no-op. The behavior for older Datasets remains unchanged. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] 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 :( --------- Signed-off-by: Masahiro Tanaka <[email protected]> Signed-off-by: Masahiro Tanaka <[email protected]> Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: Rueian <[email protected]> Signed-off-by: Rueian <[email protected]> Signed-off-by: Edward Oakes <[email protected]> Signed-off-by: Jiajun Yao <[email protected]> Signed-off-by: Matthew Owen <[email protected]> Signed-off-by: Sagar Sumit <[email protected]> Signed-off-by: xgui <[email protected]> Signed-off-by: Xinyuan <[email protected]> Signed-off-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Matthew Deng <[email protected]> Signed-off-by: Goutam V <[email protected]> Signed-off-by: root <[email protected]> Signed-off-by: Rui Qiao <[email protected]> Signed-off-by: elliot-barn <[email protected]> Signed-off-by: Yiwen Xiang <[email protected]> Signed-off-by: Mao Yancan <[email protected]> Signed-off-by: Mao Yancan <[email protected]> Signed-off-by: Cuong Nguyen <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Signed-off-by: dragongu <[email protected]> Signed-off-by: Andrew Grosser <[email protected]> Signed-off-by: Justin Yu <[email protected]> Signed-off-by: abrar <[email protected]> Signed-off-by: Kourosh Hakhamaneshi <[email protected]> Signed-off-by: Yicheng-Lu-llll <[email protected]> Signed-off-by: Potato <[email protected]> Signed-off-by: Zac Policzer <[email protected]> Signed-off-by: Cuong Nguyen <[email protected]> Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: Seiji Eicher <[email protected]> Signed-off-by: 杨睿 <[email protected]> Signed-off-by: dayshah <[email protected]> Signed-off-by: axreldable <[email protected]> Signed-off-by: kaihsun <[email protected]> Signed-off-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Timothy Seah <[email protected]> Signed-off-by: kevin <[email protected]> Signed-off-by: joshlee <[email protected]> Signed-off-by: 400Ping <[email protected]> Signed-off-by: Dhyey Shah <[email protected]> Signed-off-by: harshit <[email protected]> Signed-off-by: anmol <[email protected]> Signed-off-by: Kit Lee <[email protected]> Signed-off-by: JasonLi1909 <[email protected]> Signed-off-by: Jason Li <[email protected]> Signed-off-by: MengqingCao <[email protected]> Signed-off-by: sampan <[email protected]> Signed-off-by: zac <[email protected]> Signed-off-by: Elliot Barnwell <[email protected]> Signed-off-by: Mengjin Yan <[email protected]> Signed-off-by: myan <[email protected]> Signed-off-by: Seiji Eicher <[email protected]> Signed-off-by: Linkun <[email protected]> Signed-off-by: Balaji Veeramani <[email protected]> Signed-off-by: Markus <[email protected]> Signed-off-by: Gagandeep Singh <[email protected]> Signed-off-by: akyang-anyscale <[email protected]> Signed-off-by: Alan Guo <[email protected]> Signed-off-by: haotian <[email protected]> Signed-off-by: Howie Tien <[email protected]> Signed-off-by: will.lin <[email protected]> Signed-off-by: Richard Liaw <[email protected]> Signed-off-by: Ryan O'Leary <[email protected]> Signed-off-by: Andrew Sy Kim <[email protected]> Signed-off-by: Matvei Pashkovskii <[email protected]> Signed-off-by: Kishanthan Thangarajah <[email protected]> Signed-off-by: my-vegetable-has-exploded <[email protected]> Signed-off-by: Neil Girdhar <[email protected]> Signed-off-by: Nikhil Ghosh <[email protected]> Signed-off-by: win5923 <[email protected]> Signed-off-by: Stephanie wang <[email protected]> Signed-off-by: Stephanie Wang <[email protected]> Signed-off-by: cong.qian <[email protected]> Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: doyoung <[email protected]> Signed-off-by: Doyoung Kim <[email protected]> Signed-off-by: simonsays1980 <[email protected]> Signed-off-by: Rui Qiao <[email protected]> Signed-off-by: Sampan S Nayak <[email protected]> Signed-off-by: vincenthhan <[email protected]> Signed-off-by: jeffreyjeffreywang <[email protected]> Signed-off-by: irabbani <[email protected]> Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: avigyabb <[email protected]> Signed-off-by: avibasnet31 <[email protected]> Signed-off-by: Tanner Wood <[email protected]> Signed-off-by: avigyabb <[email protected]> Signed-off-by: Ricardo Decal <[email protected]> Signed-off-by: Matthew <[email protected]> Signed-off-by: tianyi-ge <[email protected]> Signed-off-by: can <[email protected]> Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: ahao-anyscale <[email protected]> Signed-off-by: Lehui Liu <[email protected]> Signed-off-by: Mark Rossetti <[email protected]> Signed-off-by: hejialing.hjl <[email protected]> Signed-off-by: qiwenju <[email protected]> Signed-off-by: Q文举 <[email protected]> Signed-off-by: ljstrnadiii <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Lonnie Liu <[email protected]> Co-authored-by: Rueian <[email protected]> Co-authored-by: Dhyey Shah <[email protected]> Co-authored-by: Edward Oakes <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Co-authored-by: Matthew Owen <[email protected]> Co-authored-by: Sagar Sumit <[email protected]> Co-authored-by: Xinyuan <[email protected]> Co-authored-by: Justin Yu <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: goutamvenkat-anyscale <[email protected]> Co-authored-by: vickytsang <[email protected]> Co-authored-by: Rui Qiao <[email protected]> Co-authored-by: Elliot Barnwell <[email protected]> Co-authored-by: Yevet <[email protected]> Co-authored-by: Mao Yancan <[email protected]> Co-authored-by: Mao Yancan <[email protected]> Co-authored-by: Cuong Nguyen <[email protected]> Co-authored-by: Srinath Krishnamachari <[email protected]> Co-authored-by: iamjustinhsu <[email protected]> Co-authored-by: Alexey Kudinkin <[email protected]> Co-authored-by: dragongu <[email protected]> Co-authored-by: Andrew Grosser <[email protected]> Co-authored-by: Abrar Sheikh <[email protected]> Co-authored-by: kourosh hakhamaneshi <[email protected]> Co-authored-by: Yicheng-Lu-llll <[email protected]> Co-authored-by: Potato <[email protected]> Co-authored-by: Zac Policzer <[email protected]> Co-authored-by: Alexey Kudinkin <[email protected]> Co-authored-by: Seiji Eicher <[email protected]> Co-authored-by: 杨睿 <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Aleksei Starikov <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Co-authored-by: Timothy Seah <[email protected]> Co-authored-by: Timothy Seah <[email protected]> Co-authored-by: Kevin H. Luu <[email protected]> Co-authored-by: Qiaolin Yu <[email protected]> Co-authored-by: Joshua Lee <[email protected]> Co-authored-by: Ping <[email protected]> Co-authored-by: harshit-anyscale <[email protected]> Co-authored-by: Anmol Singh <[email protected]> Co-authored-by: anmol <[email protected]> Co-authored-by: Kit Lee <[email protected]> Co-authored-by: Jason Li <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: Mengqing Cao <[email protected]> Co-authored-by: Sampan S Nayak <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Sven Mika <[email protected]> Co-authored-by: Mengjin Yan <[email protected]> Co-authored-by: Nary Yeh <[email protected]> Co-authored-by: lkchen <[email protected]> Co-authored-by: Balaji Veeramani <[email protected]> Co-authored-by: Markus <[email protected]> Co-authored-by: czgdp1807 <[email protected]> Co-authored-by: akyang-anyscale <[email protected]> Co-authored-by: Alan Guo <[email protected]> Co-authored-by: Howie Tien <[email protected]> Co-authored-by: Balaji Veeramani <[email protected]> Co-authored-by: simonsays1980 <[email protected]> Co-authored-by: William Lin <[email protected]> Co-authored-by: Richard Liaw <[email protected]> Co-authored-by: Ryan O'Leary <[email protected]> Co-authored-by: Andrew Sy Kim <[email protected]> Co-authored-by: Matvei Pashkovskii <[email protected]> Co-authored-by: Kourosh Hakhamaneshi <[email protected]> Co-authored-by: Kishanthan Thangarajah <[email protected]> Co-authored-by: yi wang <[email protected]> Co-authored-by: Neil Girdhar <[email protected]> Co-authored-by: Nikhil G <[email protected]> Co-authored-by: Jun-Hao Wan <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Co-authored-by: coqian <[email protected]> Co-authored-by: angelinalg <[email protected]> Co-authored-by: Doyoung Kim <[email protected]> Co-authored-by: vincenthhan <[email protected]> Co-authored-by: vincenthhan <[email protected]> Co-authored-by: Jeffrey Wang <[email protected]> Co-authored-by: jeffreyjeffreywang <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: avigyabb <[email protected]> Co-authored-by: avibasnet31 <[email protected]> Co-authored-by: tannerdwood <[email protected]> Co-authored-by: Tanner Wood <[email protected]> Co-authored-by: Ricardo Decal <[email protected]> Co-authored-by: Kamil Kaczmarek <[email protected]> Co-authored-by: Hassam Ullah Sheikh <[email protected]> Co-authored-by: MatthewCWeston <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Tianyi <[email protected]> Co-authored-by: gangsf <[email protected]> Co-authored-by: Gang Zhao <[email protected]> Co-authored-by: ahao-anyscale <[email protected]> Co-authored-by: Lehui Liu <[email protected]> Co-authored-by: Mark Rossetti <[email protected]> Co-authored-by: Jialing He <[email protected]> Co-authored-by: hejialing.hjl <[email protected]> Co-authored-by: Cuong Nguyen <[email protected]> Co-authored-by: Q文举 <[email protected]> Co-authored-by: qiwenju <[email protected]> Co-authored-by: Len Strnad <[email protected]> Co-authored-by: Goku Mohandas <[email protected]>
…oject#55908) ## Why are these changes needed? Hugging Face Datasets v4.0.0 removed dataset scripts and the related “dynamic modules” mechanism (See huggingface/datasets#7592), so `datasets.load.init_dynamic_modules` no longer exists. As `ray.data._internal.datasource.huggingface_datasource` currently imports/calls this function unconditionally, it raises: ``` AttributeError: module 'datasets.load' has no attribute 'init_dynamic_modules' ``` With this PR, Ray detects the legacy initializer and only calls it on Datasets ≤3.x. On Datasets ≥4.0.0 the block becomes a no-op. The behavior for older Datasets remains unchanged. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] 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 :( --------- Signed-off-by: Masahiro Tanaka <[email protected]> Signed-off-by: Masahiro Tanaka <[email protected]> Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: Rueian <[email protected]> Signed-off-by: Rueian <[email protected]> Signed-off-by: Edward Oakes <[email protected]> Signed-off-by: Jiajun Yao <[email protected]> Signed-off-by: Matthew Owen <[email protected]> Signed-off-by: Sagar Sumit <[email protected]> Signed-off-by: xgui <[email protected]> Signed-off-by: Xinyuan <[email protected]> Signed-off-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Matthew Deng <[email protected]> Signed-off-by: Goutam V <[email protected]> Signed-off-by: root <[email protected]> Signed-off-by: Rui Qiao <[email protected]> Signed-off-by: elliot-barn <[email protected]> Signed-off-by: Yiwen Xiang <[email protected]> Signed-off-by: Mao Yancan <[email protected]> Signed-off-by: Mao Yancan <[email protected]> Signed-off-by: Cuong Nguyen <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Signed-off-by: dragongu <[email protected]> Signed-off-by: Andrew Grosser <[email protected]> Signed-off-by: Justin Yu <[email protected]> Signed-off-by: abrar <[email protected]> Signed-off-by: Kourosh Hakhamaneshi <[email protected]> Signed-off-by: Yicheng-Lu-llll <[email protected]> Signed-off-by: Potato <[email protected]> Signed-off-by: Zac Policzer <[email protected]> Signed-off-by: Cuong Nguyen <[email protected]> Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: Seiji Eicher <[email protected]> Signed-off-by: 杨睿 <[email protected]> Signed-off-by: dayshah <[email protected]> Signed-off-by: axreldable <[email protected]> Signed-off-by: kaihsun <[email protected]> Signed-off-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Timothy Seah <[email protected]> Signed-off-by: kevin <[email protected]> Signed-off-by: joshlee <[email protected]> Signed-off-by: 400Ping <[email protected]> Signed-off-by: Dhyey Shah <[email protected]> Signed-off-by: harshit <[email protected]> Signed-off-by: anmol <[email protected]> Signed-off-by: Kit Lee <[email protected]> Signed-off-by: JasonLi1909 <[email protected]> Signed-off-by: Jason Li <[email protected]> Signed-off-by: MengqingCao <[email protected]> Signed-off-by: sampan <[email protected]> Signed-off-by: zac <[email protected]> Signed-off-by: Elliot Barnwell <[email protected]> Signed-off-by: Mengjin Yan <[email protected]> Signed-off-by: myan <[email protected]> Signed-off-by: Seiji Eicher <[email protected]> Signed-off-by: Linkun <[email protected]> Signed-off-by: Balaji Veeramani <[email protected]> Signed-off-by: Markus <[email protected]> Signed-off-by: Gagandeep Singh <[email protected]> Signed-off-by: akyang-anyscale <[email protected]> Signed-off-by: Alan Guo <[email protected]> Signed-off-by: haotian <[email protected]> Signed-off-by: Howie Tien <[email protected]> Signed-off-by: will.lin <[email protected]> Signed-off-by: Richard Liaw <[email protected]> Signed-off-by: Ryan O'Leary <[email protected]> Signed-off-by: Andrew Sy Kim <[email protected]> Signed-off-by: Matvei Pashkovskii <[email protected]> Signed-off-by: Kishanthan Thangarajah <[email protected]> Signed-off-by: my-vegetable-has-exploded <[email protected]> Signed-off-by: Neil Girdhar <[email protected]> Signed-off-by: Nikhil Ghosh <[email protected]> Signed-off-by: win5923 <[email protected]> Signed-off-by: Stephanie wang <[email protected]> Signed-off-by: Stephanie Wang <[email protected]> Signed-off-by: cong.qian <[email protected]> Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: doyoung <[email protected]> Signed-off-by: Doyoung Kim <[email protected]> Signed-off-by: simonsays1980 <[email protected]> Signed-off-by: Rui Qiao <[email protected]> Signed-off-by: Sampan S Nayak <[email protected]> Signed-off-by: vincenthhan <[email protected]> Signed-off-by: jeffreyjeffreywang <[email protected]> Signed-off-by: irabbani <[email protected]> Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: avigyabb <[email protected]> Signed-off-by: avibasnet31 <[email protected]> Signed-off-by: Tanner Wood <[email protected]> Signed-off-by: avigyabb <[email protected]> Signed-off-by: Ricardo Decal <[email protected]> Signed-off-by: Matthew <[email protected]> Signed-off-by: tianyi-ge <[email protected]> Signed-off-by: can <[email protected]> Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: ahao-anyscale <[email protected]> Signed-off-by: Lehui Liu <[email protected]> Signed-off-by: Mark Rossetti <[email protected]> Signed-off-by: hejialing.hjl <[email protected]> Signed-off-by: qiwenju <[email protected]> Signed-off-by: Q文举 <[email protected]> Signed-off-by: ljstrnadiii <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Lonnie Liu <[email protected]> Co-authored-by: Rueian <[email protected]> Co-authored-by: Dhyey Shah <[email protected]> Co-authored-by: Edward Oakes <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Co-authored-by: Matthew Owen <[email protected]> Co-authored-by: Sagar Sumit <[email protected]> Co-authored-by: Xinyuan <[email protected]> Co-authored-by: Justin Yu <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: goutamvenkat-anyscale <[email protected]> Co-authored-by: vickytsang <[email protected]> Co-authored-by: Rui Qiao <[email protected]> Co-authored-by: Elliot Barnwell <[email protected]> Co-authored-by: Yevet <[email protected]> Co-authored-by: Mao Yancan <[email protected]> Co-authored-by: Mao Yancan <[email protected]> Co-authored-by: Cuong Nguyen <[email protected]> Co-authored-by: Srinath Krishnamachari <[email protected]> Co-authored-by: iamjustinhsu <[email protected]> Co-authored-by: Alexey Kudinkin <[email protected]> Co-authored-by: dragongu <[email protected]> Co-authored-by: Andrew Grosser <[email protected]> Co-authored-by: Abrar Sheikh <[email protected]> Co-authored-by: kourosh hakhamaneshi <[email protected]> Co-authored-by: Yicheng-Lu-llll <[email protected]> Co-authored-by: Potato <[email protected]> Co-authored-by: Zac Policzer <[email protected]> Co-authored-by: Alexey Kudinkin <[email protected]> Co-authored-by: Seiji Eicher <[email protected]> Co-authored-by: 杨睿 <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Aleksei Starikov <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Co-authored-by: Timothy Seah <[email protected]> Co-authored-by: Timothy Seah <[email protected]> Co-authored-by: Kevin H. Luu <[email protected]> Co-authored-by: Qiaolin Yu <[email protected]> Co-authored-by: Joshua Lee <[email protected]> Co-authored-by: Ping <[email protected]> Co-authored-by: harshit-anyscale <[email protected]> Co-authored-by: Anmol Singh <[email protected]> Co-authored-by: anmol <[email protected]> Co-authored-by: Kit Lee <[email protected]> Co-authored-by: Jason Li <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: Mengqing Cao <[email protected]> Co-authored-by: Sampan S Nayak <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Sven Mika <[email protected]> Co-authored-by: Mengjin Yan <[email protected]> Co-authored-by: Nary Yeh <[email protected]> Co-authored-by: lkchen <[email protected]> Co-authored-by: Balaji Veeramani <[email protected]> Co-authored-by: Markus <[email protected]> Co-authored-by: czgdp1807 <[email protected]> Co-authored-by: akyang-anyscale <[email protected]> Co-authored-by: Alan Guo <[email protected]> Co-authored-by: Howie Tien <[email protected]> Co-authored-by: Balaji Veeramani <[email protected]> Co-authored-by: simonsays1980 <[email protected]> Co-authored-by: William Lin <[email protected]> Co-authored-by: Richard Liaw <[email protected]> Co-authored-by: Ryan O'Leary <[email protected]> Co-authored-by: Andrew Sy Kim <[email protected]> Co-authored-by: Matvei Pashkovskii <[email protected]> Co-authored-by: Kourosh Hakhamaneshi <[email protected]> Co-authored-by: Kishanthan Thangarajah <[email protected]> Co-authored-by: yi wang <[email protected]> Co-authored-by: Neil Girdhar <[email protected]> Co-authored-by: Nikhil G <[email protected]> Co-authored-by: Jun-Hao Wan <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Co-authored-by: coqian <[email protected]> Co-authored-by: angelinalg <[email protected]> Co-authored-by: Doyoung Kim <[email protected]> Co-authored-by: vincenthhan <[email protected]> Co-authored-by: vincenthhan <[email protected]> Co-authored-by: Jeffrey Wang <[email protected]> Co-authored-by: jeffreyjeffreywang <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: avigyabb <[email protected]> Co-authored-by: avibasnet31 <[email protected]> Co-authored-by: tannerdwood <[email protected]> Co-authored-by: Tanner Wood <[email protected]> Co-authored-by: Ricardo Decal <[email protected]> Co-authored-by: Kamil Kaczmarek <[email protected]> Co-authored-by: Hassam Ullah Sheikh <[email protected]> Co-authored-by: MatthewCWeston <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Tianyi <[email protected]> Co-authored-by: gangsf <[email protected]> Co-authored-by: Gang Zhao <[email protected]> Co-authored-by: ahao-anyscale <[email protected]> Co-authored-by: Lehui Liu <[email protected]> Co-authored-by: Mark Rossetti <[email protected]> Co-authored-by: Jialing He <[email protected]> Co-authored-by: hejialing.hjl <[email protected]> Co-authored-by: Cuong Nguyen <[email protected]> Co-authored-by: Q文举 <[email protected]> Co-authored-by: qiwenju <[email protected]> Co-authored-by: Len Strnad <[email protected]> Co-authored-by: Goku Mohandas <[email protected]> Signed-off-by: zac <[email protected]>
…oject#55908) ## Why are these changes needed? Hugging Face Datasets v4.0.0 removed dataset scripts and the related “dynamic modules” mechanism (See huggingface/datasets#7592), so `datasets.load.init_dynamic_modules` no longer exists. As `ray.data._internal.datasource.huggingface_datasource` currently imports/calls this function unconditionally, it raises: ``` AttributeError: module 'datasets.load' has no attribute 'init_dynamic_modules' ``` With this PR, Ray detects the legacy initializer and only calls it on Datasets ≤3.x. On Datasets ≥4.0.0 the block becomes a no-op. The behavior for older Datasets remains unchanged. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] 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 :( --------- Signed-off-by: Masahiro Tanaka <[email protected]> Signed-off-by: Masahiro Tanaka <[email protected]> Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: Rueian <[email protected]> Signed-off-by: Rueian <[email protected]> Signed-off-by: Edward Oakes <[email protected]> Signed-off-by: Jiajun Yao <[email protected]> Signed-off-by: Matthew Owen <[email protected]> Signed-off-by: Sagar Sumit <[email protected]> Signed-off-by: xgui <[email protected]> Signed-off-by: Xinyuan <[email protected]> Signed-off-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Matthew Deng <[email protected]> Signed-off-by: Goutam V <[email protected]> Signed-off-by: root <[email protected]> Signed-off-by: Rui Qiao <[email protected]> Signed-off-by: elliot-barn <[email protected]> Signed-off-by: Yiwen Xiang <[email protected]> Signed-off-by: Mao Yancan <[email protected]> Signed-off-by: Mao Yancan <[email protected]> Signed-off-by: Cuong Nguyen <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Signed-off-by: dragongu <[email protected]> Signed-off-by: Andrew Grosser <[email protected]> Signed-off-by: Justin Yu <[email protected]> Signed-off-by: abrar <[email protected]> Signed-off-by: Kourosh Hakhamaneshi <[email protected]> Signed-off-by: Yicheng-Lu-llll <[email protected]> Signed-off-by: Potato <[email protected]> Signed-off-by: Zac Policzer <[email protected]> Signed-off-by: Cuong Nguyen <[email protected]> Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: Seiji Eicher <[email protected]> Signed-off-by: 杨睿 <[email protected]> Signed-off-by: dayshah <[email protected]> Signed-off-by: axreldable <[email protected]> Signed-off-by: kaihsun <[email protected]> Signed-off-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Timothy Seah <[email protected]> Signed-off-by: kevin <[email protected]> Signed-off-by: joshlee <[email protected]> Signed-off-by: 400Ping <[email protected]> Signed-off-by: Dhyey Shah <[email protected]> Signed-off-by: harshit <[email protected]> Signed-off-by: anmol <[email protected]> Signed-off-by: Kit Lee <[email protected]> Signed-off-by: JasonLi1909 <[email protected]> Signed-off-by: Jason Li <[email protected]> Signed-off-by: MengqingCao <[email protected]> Signed-off-by: sampan <[email protected]> Signed-off-by: zac <[email protected]> Signed-off-by: Elliot Barnwell <[email protected]> Signed-off-by: Mengjin Yan <[email protected]> Signed-off-by: myan <[email protected]> Signed-off-by: Seiji Eicher <[email protected]> Signed-off-by: Linkun <[email protected]> Signed-off-by: Balaji Veeramani <[email protected]> Signed-off-by: Markus <[email protected]> Signed-off-by: Gagandeep Singh <[email protected]> Signed-off-by: akyang-anyscale <[email protected]> Signed-off-by: Alan Guo <[email protected]> Signed-off-by: haotian <[email protected]> Signed-off-by: Howie Tien <[email protected]> Signed-off-by: will.lin <[email protected]> Signed-off-by: Richard Liaw <[email protected]> Signed-off-by: Ryan O'Leary <[email protected]> Signed-off-by: Andrew Sy Kim <[email protected]> Signed-off-by: Matvei Pashkovskii <[email protected]> Signed-off-by: Kishanthan Thangarajah <[email protected]> Signed-off-by: my-vegetable-has-exploded <[email protected]> Signed-off-by: Neil Girdhar <[email protected]> Signed-off-by: Nikhil Ghosh <[email protected]> Signed-off-by: win5923 <[email protected]> Signed-off-by: Stephanie wang <[email protected]> Signed-off-by: Stephanie Wang <[email protected]> Signed-off-by: cong.qian <[email protected]> Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: doyoung <[email protected]> Signed-off-by: Doyoung Kim <[email protected]> Signed-off-by: simonsays1980 <[email protected]> Signed-off-by: Rui Qiao <[email protected]> Signed-off-by: Sampan S Nayak <[email protected]> Signed-off-by: vincenthhan <[email protected]> Signed-off-by: jeffreyjeffreywang <[email protected]> Signed-off-by: irabbani <[email protected]> Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: avigyabb <[email protected]> Signed-off-by: avibasnet31 <[email protected]> Signed-off-by: Tanner Wood <[email protected]> Signed-off-by: avigyabb <[email protected]> Signed-off-by: Ricardo Decal <[email protected]> Signed-off-by: Matthew <[email protected]> Signed-off-by: tianyi-ge <[email protected]> Signed-off-by: can <[email protected]> Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: ahao-anyscale <[email protected]> Signed-off-by: Lehui Liu <[email protected]> Signed-off-by: Mark Rossetti <[email protected]> Signed-off-by: hejialing.hjl <[email protected]> Signed-off-by: qiwenju <[email protected]> Signed-off-by: Q文举 <[email protected]> Signed-off-by: ljstrnadiii <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Lonnie Liu <[email protected]> Co-authored-by: Rueian <[email protected]> Co-authored-by: Dhyey Shah <[email protected]> Co-authored-by: Edward Oakes <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Co-authored-by: Matthew Owen <[email protected]> Co-authored-by: Sagar Sumit <[email protected]> Co-authored-by: Xinyuan <[email protected]> Co-authored-by: Justin Yu <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: goutamvenkat-anyscale <[email protected]> Co-authored-by: vickytsang <[email protected]> Co-authored-by: Rui Qiao <[email protected]> Co-authored-by: Elliot Barnwell <[email protected]> Co-authored-by: Yevet <[email protected]> Co-authored-by: Mao Yancan <[email protected]> Co-authored-by: Mao Yancan <[email protected]> Co-authored-by: Cuong Nguyen <[email protected]> Co-authored-by: Srinath Krishnamachari <[email protected]> Co-authored-by: iamjustinhsu <[email protected]> Co-authored-by: Alexey Kudinkin <[email protected]> Co-authored-by: dragongu <[email protected]> Co-authored-by: Andrew Grosser <[email protected]> Co-authored-by: Abrar Sheikh <[email protected]> Co-authored-by: kourosh hakhamaneshi <[email protected]> Co-authored-by: Yicheng-Lu-llll <[email protected]> Co-authored-by: Potato <[email protected]> Co-authored-by: Zac Policzer <[email protected]> Co-authored-by: Alexey Kudinkin <[email protected]> Co-authored-by: Seiji Eicher <[email protected]> Co-authored-by: 杨睿 <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Aleksei Starikov <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Co-authored-by: Timothy Seah <[email protected]> Co-authored-by: Timothy Seah <[email protected]> Co-authored-by: Kevin H. Luu <[email protected]> Co-authored-by: Qiaolin Yu <[email protected]> Co-authored-by: Joshua Lee <[email protected]> Co-authored-by: Ping <[email protected]> Co-authored-by: harshit-anyscale <[email protected]> Co-authored-by: Anmol Singh <[email protected]> Co-authored-by: anmol <[email protected]> Co-authored-by: Kit Lee <[email protected]> Co-authored-by: Jason Li <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: Mengqing Cao <[email protected]> Co-authored-by: Sampan S Nayak <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Sven Mika <[email protected]> Co-authored-by: Mengjin Yan <[email protected]> Co-authored-by: Nary Yeh <[email protected]> Co-authored-by: lkchen <[email protected]> Co-authored-by: Balaji Veeramani <[email protected]> Co-authored-by: Markus <[email protected]> Co-authored-by: czgdp1807 <[email protected]> Co-authored-by: akyang-anyscale <[email protected]> Co-authored-by: Alan Guo <[email protected]> Co-authored-by: Howie Tien <[email protected]> Co-authored-by: Balaji Veeramani <[email protected]> Co-authored-by: simonsays1980 <[email protected]> Co-authored-by: William Lin <[email protected]> Co-authored-by: Richard Liaw <[email protected]> Co-authored-by: Ryan O'Leary <[email protected]> Co-authored-by: Andrew Sy Kim <[email protected]> Co-authored-by: Matvei Pashkovskii <[email protected]> Co-authored-by: Kourosh Hakhamaneshi <[email protected]> Co-authored-by: Kishanthan Thangarajah <[email protected]> Co-authored-by: yi wang <[email protected]> Co-authored-by: Neil Girdhar <[email protected]> Co-authored-by: Nikhil G <[email protected]> Co-authored-by: Jun-Hao Wan <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Co-authored-by: coqian <[email protected]> Co-authored-by: angelinalg <[email protected]> Co-authored-by: Doyoung Kim <[email protected]> Co-authored-by: vincenthhan <[email protected]> Co-authored-by: vincenthhan <[email protected]> Co-authored-by: Jeffrey Wang <[email protected]> Co-authored-by: jeffreyjeffreywang <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: avigyabb <[email protected]> Co-authored-by: avibasnet31 <[email protected]> Co-authored-by: tannerdwood <[email protected]> Co-authored-by: Tanner Wood <[email protected]> Co-authored-by: Ricardo Decal <[email protected]> Co-authored-by: Kamil Kaczmarek <[email protected]> Co-authored-by: Hassam Ullah Sheikh <[email protected]> Co-authored-by: MatthewCWeston <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Tianyi <[email protected]> Co-authored-by: gangsf <[email protected]> Co-authored-by: Gang Zhao <[email protected]> Co-authored-by: ahao-anyscale <[email protected]> Co-authored-by: Lehui Liu <[email protected]> Co-authored-by: Mark Rossetti <[email protected]> Co-authored-by: Jialing He <[email protected]> Co-authored-by: hejialing.hjl <[email protected]> Co-authored-by: Cuong Nguyen <[email protected]> Co-authored-by: Q文举 <[email protected]> Co-authored-by: qiwenju <[email protected]> Co-authored-by: Len Strnad <[email protected]> Co-authored-by: Goku Mohandas <[email protected]> Signed-off-by: Marco Stephan <[email protected]>
## Why are these changes needed? Hugging Face Datasets v4.0.0 removed dataset scripts and the related “dynamic modules” mechanism (See huggingface/datasets#7592), so `datasets.load.init_dynamic_modules` no longer exists. As `ray.data._internal.datasource.huggingface_datasource` currently imports/calls this function unconditionally, it raises: ``` AttributeError: module 'datasets.load' has no attribute 'init_dynamic_modules' ``` With this PR, Ray detects the legacy initializer and only calls it on Datasets ≤3.x. On Datasets ≥4.0.0 the block becomes a no-op. The behavior for older Datasets remains unchanged. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] 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 :( --------- Signed-off-by: Masahiro Tanaka <[email protected]> Signed-off-by: Masahiro Tanaka <[email protected]> Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: Rueian <[email protected]> Signed-off-by: Rueian <[email protected]> Signed-off-by: Edward Oakes <[email protected]> Signed-off-by: Jiajun Yao <[email protected]> Signed-off-by: Matthew Owen <[email protected]> Signed-off-by: Sagar Sumit <[email protected]> Signed-off-by: xgui <[email protected]> Signed-off-by: Xinyuan <[email protected]> Signed-off-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Matthew Deng <[email protected]> Signed-off-by: Goutam V <[email protected]> Signed-off-by: root <[email protected]> Signed-off-by: Rui Qiao <[email protected]> Signed-off-by: elliot-barn <[email protected]> Signed-off-by: Yiwen Xiang <[email protected]> Signed-off-by: Mao Yancan <[email protected]> Signed-off-by: Mao Yancan <[email protected]> Signed-off-by: Cuong Nguyen <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Signed-off-by: dragongu <[email protected]> Signed-off-by: Andrew Grosser <[email protected]> Signed-off-by: Justin Yu <[email protected]> Signed-off-by: abrar <[email protected]> Signed-off-by: Kourosh Hakhamaneshi <[email protected]> Signed-off-by: Yicheng-Lu-llll <[email protected]> Signed-off-by: Potato <[email protected]> Signed-off-by: Zac Policzer <[email protected]> Signed-off-by: Cuong Nguyen <[email protected]> Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: Seiji Eicher <[email protected]> Signed-off-by: 杨睿 <[email protected]> Signed-off-by: dayshah <[email protected]> Signed-off-by: axreldable <[email protected]> Signed-off-by: kaihsun <[email protected]> Signed-off-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Timothy Seah <[email protected]> Signed-off-by: kevin <[email protected]> Signed-off-by: joshlee <[email protected]> Signed-off-by: 400Ping <[email protected]> Signed-off-by: Dhyey Shah <[email protected]> Signed-off-by: harshit <[email protected]> Signed-off-by: anmol <[email protected]> Signed-off-by: Kit Lee <[email protected]> Signed-off-by: JasonLi1909 <[email protected]> Signed-off-by: Jason Li <[email protected]> Signed-off-by: MengqingCao <[email protected]> Signed-off-by: sampan <[email protected]> Signed-off-by: zac <[email protected]> Signed-off-by: Elliot Barnwell <[email protected]> Signed-off-by: Mengjin Yan <[email protected]> Signed-off-by: myan <[email protected]> Signed-off-by: Seiji Eicher <[email protected]> Signed-off-by: Linkun <[email protected]> Signed-off-by: Balaji Veeramani <[email protected]> Signed-off-by: Markus <[email protected]> Signed-off-by: Gagandeep Singh <[email protected]> Signed-off-by: akyang-anyscale <[email protected]> Signed-off-by: Alan Guo <[email protected]> Signed-off-by: haotian <[email protected]> Signed-off-by: Howie Tien <[email protected]> Signed-off-by: will.lin <[email protected]> Signed-off-by: Richard Liaw <[email protected]> Signed-off-by: Ryan O'Leary <[email protected]> Signed-off-by: Andrew Sy Kim <[email protected]> Signed-off-by: Matvei Pashkovskii <[email protected]> Signed-off-by: Kishanthan Thangarajah <[email protected]> Signed-off-by: my-vegetable-has-exploded <[email protected]> Signed-off-by: Neil Girdhar <[email protected]> Signed-off-by: Nikhil Ghosh <[email protected]> Signed-off-by: win5923 <[email protected]> Signed-off-by: Stephanie wang <[email protected]> Signed-off-by: Stephanie Wang <[email protected]> Signed-off-by: cong.qian <[email protected]> Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: doyoung <[email protected]> Signed-off-by: Doyoung Kim <[email protected]> Signed-off-by: simonsays1980 <[email protected]> Signed-off-by: Rui Qiao <[email protected]> Signed-off-by: Sampan S Nayak <[email protected]> Signed-off-by: vincenthhan <[email protected]> Signed-off-by: jeffreyjeffreywang <[email protected]> Signed-off-by: irabbani <[email protected]> Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: avigyabb <[email protected]> Signed-off-by: avibasnet31 <[email protected]> Signed-off-by: Tanner Wood <[email protected]> Signed-off-by: avigyabb <[email protected]> Signed-off-by: Ricardo Decal <[email protected]> Signed-off-by: Matthew <[email protected]> Signed-off-by: tianyi-ge <[email protected]> Signed-off-by: can <[email protected]> Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: ahao-anyscale <[email protected]> Signed-off-by: Lehui Liu <[email protected]> Signed-off-by: Mark Rossetti <[email protected]> Signed-off-by: hejialing.hjl <[email protected]> Signed-off-by: qiwenju <[email protected]> Signed-off-by: Q文举 <[email protected]> Signed-off-by: ljstrnadiii <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Lonnie Liu <[email protected]> Co-authored-by: Rueian <[email protected]> Co-authored-by: Dhyey Shah <[email protected]> Co-authored-by: Edward Oakes <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Co-authored-by: Matthew Owen <[email protected]> Co-authored-by: Sagar Sumit <[email protected]> Co-authored-by: Xinyuan <[email protected]> Co-authored-by: Justin Yu <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: goutamvenkat-anyscale <[email protected]> Co-authored-by: vickytsang <[email protected]> Co-authored-by: Rui Qiao <[email protected]> Co-authored-by: Elliot Barnwell <[email protected]> Co-authored-by: Yevet <[email protected]> Co-authored-by: Mao Yancan <[email protected]> Co-authored-by: Mao Yancan <[email protected]> Co-authored-by: Cuong Nguyen <[email protected]> Co-authored-by: Srinath Krishnamachari <[email protected]> Co-authored-by: iamjustinhsu <[email protected]> Co-authored-by: Alexey Kudinkin <[email protected]> Co-authored-by: dragongu <[email protected]> Co-authored-by: Andrew Grosser <[email protected]> Co-authored-by: Abrar Sheikh <[email protected]> Co-authored-by: kourosh hakhamaneshi <[email protected]> Co-authored-by: Yicheng-Lu-llll <[email protected]> Co-authored-by: Potato <[email protected]> Co-authored-by: Zac Policzer <[email protected]> Co-authored-by: Alexey Kudinkin <[email protected]> Co-authored-by: Seiji Eicher <[email protected]> Co-authored-by: 杨睿 <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Aleksei Starikov <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Co-authored-by: Timothy Seah <[email protected]> Co-authored-by: Timothy Seah <[email protected]> Co-authored-by: Kevin H. Luu <[email protected]> Co-authored-by: Qiaolin Yu <[email protected]> Co-authored-by: Joshua Lee <[email protected]> Co-authored-by: Ping <[email protected]> Co-authored-by: harshit-anyscale <[email protected]> Co-authored-by: Anmol Singh <[email protected]> Co-authored-by: anmol <[email protected]> Co-authored-by: Kit Lee <[email protected]> Co-authored-by: Jason Li <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: Mengqing Cao <[email protected]> Co-authored-by: Sampan S Nayak <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Sven Mika <[email protected]> Co-authored-by: Mengjin Yan <[email protected]> Co-authored-by: Nary Yeh <[email protected]> Co-authored-by: lkchen <[email protected]> Co-authored-by: Balaji Veeramani <[email protected]> Co-authored-by: Markus <[email protected]> Co-authored-by: czgdp1807 <[email protected]> Co-authored-by: akyang-anyscale <[email protected]> Co-authored-by: Alan Guo <[email protected]> Co-authored-by: Howie Tien <[email protected]> Co-authored-by: Balaji Veeramani <[email protected]> Co-authored-by: simonsays1980 <[email protected]> Co-authored-by: William Lin <[email protected]> Co-authored-by: Richard Liaw <[email protected]> Co-authored-by: Ryan O'Leary <[email protected]> Co-authored-by: Andrew Sy Kim <[email protected]> Co-authored-by: Matvei Pashkovskii <[email protected]> Co-authored-by: Kourosh Hakhamaneshi <[email protected]> Co-authored-by: Kishanthan Thangarajah <[email protected]> Co-authored-by: yi wang <[email protected]> Co-authored-by: Neil Girdhar <[email protected]> Co-authored-by: Nikhil G <[email protected]> Co-authored-by: Jun-Hao Wan <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Co-authored-by: coqian <[email protected]> Co-authored-by: angelinalg <[email protected]> Co-authored-by: Doyoung Kim <[email protected]> Co-authored-by: vincenthhan <[email protected]> Co-authored-by: vincenthhan <[email protected]> Co-authored-by: Jeffrey Wang <[email protected]> Co-authored-by: jeffreyjeffreywang <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: avigyabb <[email protected]> Co-authored-by: avibasnet31 <[email protected]> Co-authored-by: tannerdwood <[email protected]> Co-authored-by: Tanner Wood <[email protected]> Co-authored-by: Ricardo Decal <[email protected]> Co-authored-by: Kamil Kaczmarek <[email protected]> Co-authored-by: Hassam Ullah Sheikh <[email protected]> Co-authored-by: MatthewCWeston <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Tianyi <[email protected]> Co-authored-by: gangsf <[email protected]> Co-authored-by: Gang Zhao <[email protected]> Co-authored-by: ahao-anyscale <[email protected]> Co-authored-by: Lehui Liu <[email protected]> Co-authored-by: Mark Rossetti <[email protected]> Co-authored-by: Jialing He <[email protected]> Co-authored-by: hejialing.hjl <[email protected]> Co-authored-by: Cuong Nguyen <[email protected]> Co-authored-by: Q文举 <[email protected]> Co-authored-by: qiwenju <[email protected]> Co-authored-by: Len Strnad <[email protected]> Co-authored-by: Goku Mohandas <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
…oject#55908) ## Why are these changes needed? Hugging Face Datasets v4.0.0 removed dataset scripts and the related “dynamic modules” mechanism (See huggingface/datasets#7592), so `datasets.load.init_dynamic_modules` no longer exists. As `ray.data._internal.datasource.huggingface_datasource` currently imports/calls this function unconditionally, it raises: ``` AttributeError: module 'datasets.load' has no attribute 'init_dynamic_modules' ``` With this PR, Ray detects the legacy initializer and only calls it on Datasets ≤3.x. On Datasets ≥4.0.0 the block becomes a no-op. The behavior for older Datasets remains unchanged. ## Related issue number NA ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] 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 :( --------- Signed-off-by: Masahiro Tanaka <[email protected]> Signed-off-by: Masahiro Tanaka <[email protected]> Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: Rueian <[email protected]> Signed-off-by: Rueian <[email protected]> Signed-off-by: Edward Oakes <[email protected]> Signed-off-by: Jiajun Yao <[email protected]> Signed-off-by: Matthew Owen <[email protected]> Signed-off-by: Sagar Sumit <[email protected]> Signed-off-by: xgui <[email protected]> Signed-off-by: Xinyuan <[email protected]> Signed-off-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Matthew Deng <[email protected]> Signed-off-by: Goutam V <[email protected]> Signed-off-by: root <[email protected]> Signed-off-by: Rui Qiao <[email protected]> Signed-off-by: elliot-barn <[email protected]> Signed-off-by: Yiwen Xiang <[email protected]> Signed-off-by: Mao Yancan <[email protected]> Signed-off-by: Mao Yancan <[email protected]> Signed-off-by: Cuong Nguyen <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Signed-off-by: dragongu <[email protected]> Signed-off-by: Andrew Grosser <[email protected]> Signed-off-by: Justin Yu <[email protected]> Signed-off-by: abrar <[email protected]> Signed-off-by: Kourosh Hakhamaneshi <[email protected]> Signed-off-by: Yicheng-Lu-llll <[email protected]> Signed-off-by: Potato <[email protected]> Signed-off-by: Zac Policzer <[email protected]> Signed-off-by: Cuong Nguyen <[email protected]> Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: Seiji Eicher <[email protected]> Signed-off-by: 杨睿 <[email protected]> Signed-off-by: dayshah <[email protected]> Signed-off-by: axreldable <[email protected]> Signed-off-by: kaihsun <[email protected]> Signed-off-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Timothy Seah <[email protected]> Signed-off-by: kevin <[email protected]> Signed-off-by: joshlee <[email protected]> Signed-off-by: 400Ping <[email protected]> Signed-off-by: Dhyey Shah <[email protected]> Signed-off-by: harshit <[email protected]> Signed-off-by: anmol <[email protected]> Signed-off-by: Kit Lee <[email protected]> Signed-off-by: JasonLi1909 <[email protected]> Signed-off-by: Jason Li <[email protected]> Signed-off-by: MengqingCao <[email protected]> Signed-off-by: sampan <[email protected]> Signed-off-by: zac <[email protected]> Signed-off-by: Elliot Barnwell <[email protected]> Signed-off-by: Mengjin Yan <[email protected]> Signed-off-by: myan <[email protected]> Signed-off-by: Seiji Eicher <[email protected]> Signed-off-by: Linkun <[email protected]> Signed-off-by: Balaji Veeramani <[email protected]> Signed-off-by: Markus <[email protected]> Signed-off-by: Gagandeep Singh <[email protected]> Signed-off-by: akyang-anyscale <[email protected]> Signed-off-by: Alan Guo <[email protected]> Signed-off-by: haotian <[email protected]> Signed-off-by: Howie Tien <[email protected]> Signed-off-by: will.lin <[email protected]> Signed-off-by: Richard Liaw <[email protected]> Signed-off-by: Ryan O'Leary <[email protected]> Signed-off-by: Andrew Sy Kim <[email protected]> Signed-off-by: Matvei Pashkovskii <[email protected]> Signed-off-by: Kishanthan Thangarajah <[email protected]> Signed-off-by: my-vegetable-has-exploded <[email protected]> Signed-off-by: Neil Girdhar <[email protected]> Signed-off-by: Nikhil Ghosh <[email protected]> Signed-off-by: win5923 <[email protected]> Signed-off-by: Stephanie wang <[email protected]> Signed-off-by: Stephanie Wang <[email protected]> Signed-off-by: cong.qian <[email protected]> Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: doyoung <[email protected]> Signed-off-by: Doyoung Kim <[email protected]> Signed-off-by: simonsays1980 <[email protected]> Signed-off-by: Rui Qiao <[email protected]> Signed-off-by: Sampan S Nayak <[email protected]> Signed-off-by: vincenthhan <[email protected]> Signed-off-by: jeffreyjeffreywang <[email protected]> Signed-off-by: irabbani <[email protected]> Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: avigyabb <[email protected]> Signed-off-by: avibasnet31 <[email protected]> Signed-off-by: Tanner Wood <[email protected]> Signed-off-by: avigyabb <[email protected]> Signed-off-by: Ricardo Decal <[email protected]> Signed-off-by: Matthew <[email protected]> Signed-off-by: tianyi-ge <[email protected]> Signed-off-by: can <[email protected]> Signed-off-by: Alexey Kudinkin <[email protected]> Signed-off-by: ahao-anyscale <[email protected]> Signed-off-by: Lehui Liu <[email protected]> Signed-off-by: Mark Rossetti <[email protected]> Signed-off-by: hejialing.hjl <[email protected]> Signed-off-by: qiwenju <[email protected]> Signed-off-by: Q文举 <[email protected]> Signed-off-by: ljstrnadiii <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Lonnie Liu <[email protected]> Co-authored-by: Rueian <[email protected]> Co-authored-by: Dhyey Shah <[email protected]> Co-authored-by: Edward Oakes <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Co-authored-by: Matthew Owen <[email protected]> Co-authored-by: Sagar Sumit <[email protected]> Co-authored-by: Xinyuan <[email protected]> Co-authored-by: Justin Yu <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: goutamvenkat-anyscale <[email protected]> Co-authored-by: vickytsang <[email protected]> Co-authored-by: Rui Qiao <[email protected]> Co-authored-by: Elliot Barnwell <[email protected]> Co-authored-by: Yevet <[email protected]> Co-authored-by: Mao Yancan <[email protected]> Co-authored-by: Mao Yancan <[email protected]> Co-authored-by: Cuong Nguyen <[email protected]> Co-authored-by: Srinath Krishnamachari <[email protected]> Co-authored-by: iamjustinhsu <[email protected]> Co-authored-by: Alexey Kudinkin <[email protected]> Co-authored-by: dragongu <[email protected]> Co-authored-by: Andrew Grosser <[email protected]> Co-authored-by: Abrar Sheikh <[email protected]> Co-authored-by: kourosh hakhamaneshi <[email protected]> Co-authored-by: Yicheng-Lu-llll <[email protected]> Co-authored-by: Potato <[email protected]> Co-authored-by: Zac Policzer <[email protected]> Co-authored-by: Alexey Kudinkin <[email protected]> Co-authored-by: Seiji Eicher <[email protected]> Co-authored-by: 杨睿 <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Aleksei Starikov <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Co-authored-by: Timothy Seah <[email protected]> Co-authored-by: Timothy Seah <[email protected]> Co-authored-by: Kevin H. Luu <[email protected]> Co-authored-by: Qiaolin Yu <[email protected]> Co-authored-by: Joshua Lee <[email protected]> Co-authored-by: Ping <[email protected]> Co-authored-by: harshit-anyscale <[email protected]> Co-authored-by: Anmol Singh <[email protected]> Co-authored-by: anmol <[email protected]> Co-authored-by: Kit Lee <[email protected]> Co-authored-by: Jason Li <[email protected]> Co-authored-by: matthewdeng <[email protected]> Co-authored-by: Mengqing Cao <[email protected]> Co-authored-by: Sampan S Nayak <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Sven Mika <[email protected]> Co-authored-by: Mengjin Yan <[email protected]> Co-authored-by: Nary Yeh <[email protected]> Co-authored-by: lkchen <[email protected]> Co-authored-by: Balaji Veeramani <[email protected]> Co-authored-by: Markus <[email protected]> Co-authored-by: czgdp1807 <[email protected]> Co-authored-by: akyang-anyscale <[email protected]> Co-authored-by: Alan Guo <[email protected]> Co-authored-by: Howie Tien <[email protected]> Co-authored-by: Balaji Veeramani <[email protected]> Co-authored-by: simonsays1980 <[email protected]> Co-authored-by: William Lin <[email protected]> Co-authored-by: Richard Liaw <[email protected]> Co-authored-by: Ryan O'Leary <[email protected]> Co-authored-by: Andrew Sy Kim <[email protected]> Co-authored-by: Matvei Pashkovskii <[email protected]> Co-authored-by: Kourosh Hakhamaneshi <[email protected]> Co-authored-by: Kishanthan Thangarajah <[email protected]> Co-authored-by: yi wang <[email protected]> Co-authored-by: Neil Girdhar <[email protected]> Co-authored-by: Nikhil G <[email protected]> Co-authored-by: Jun-Hao Wan <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]> Co-authored-by: Stephanie Wang <[email protected]> Co-authored-by: coqian <[email protected]> Co-authored-by: angelinalg <[email protected]> Co-authored-by: Doyoung Kim <[email protected]> Co-authored-by: vincenthhan <[email protected]> Co-authored-by: vincenthhan <[email protected]> Co-authored-by: Jeffrey Wang <[email protected]> Co-authored-by: jeffreyjeffreywang <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: avigyabb <[email protected]> Co-authored-by: avibasnet31 <[email protected]> Co-authored-by: tannerdwood <[email protected]> Co-authored-by: Tanner Wood <[email protected]> Co-authored-by: Ricardo Decal <[email protected]> Co-authored-by: Kamil Kaczmarek <[email protected]> Co-authored-by: Hassam Ullah Sheikh <[email protected]> Co-authored-by: MatthewCWeston <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Tianyi <[email protected]> Co-authored-by: gangsf <[email protected]> Co-authored-by: Gang Zhao <[email protected]> Co-authored-by: ahao-anyscale <[email protected]> Co-authored-by: Lehui Liu <[email protected]> Co-authored-by: Mark Rossetti <[email protected]> Co-authored-by: Jialing He <[email protected]> Co-authored-by: hejialing.hjl <[email protected]> Co-authored-by: Cuong Nguyen <[email protected]> Co-authored-by: Q文举 <[email protected]> Co-authored-by: qiwenju <[email protected]> Co-authored-by: Len Strnad <[email protected]> Co-authored-by: Goku Mohandas <[email protected]>
TODO: