Repository navigation
[deps] Pin datasets==3.6.0 in py313 train-requirements - #62926
Merged
Merged
Conversation
requirements_compiled_py3.13.txt resolved `datasets` to 4.8.4 on this
branch; master's py3.13 compiled file resolves 3.6.0. HF datasets 4.0
(July 2025) was a major break — removed script-based dataset support
and changed schema/dtype behavior that cascades into
ray.data.from_huggingface → iter_torch_batches → accelerate's
gather_for_metrics.
traingputests / traingpu2tests shards fail deterministically on
//python/ray/train:accelerate_torch_trainer and
:accelerate_torch_trainer_no_raydata with:
File ".../evaluate_modules/.../glue.py", line 84, in simple_accuracy
return float((preds == labels).mean())
AttributeError: 'bool' object has no attribute 'mean'
This surfaces when `metric.add_batch` is never called (or preds and
refs end up as scalars), so `[] == []` in the glue accuracy fn returns
a Python bool instead of an ndarray. Pinning datasets to 3.6.0 matches
the last-known-good CI baseline on master.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request pins the datasets library to version 3.6.0 in the Python 3.13 training requirements. The review feedback indicates that this pin should be moved to the base requirements file to ensure it is correctly incorporated during dependency compilation and to maintain consistency across all Python versions.
| accelerate>=0.20.1 | ||
| deepspeed>=0.12.3 | ||
| datasets | ||
| datasets==3.6.0 |
Contributor
There was a problem hiding this comment.
Pinning datasets in this py313-specific file may not be effective or sufficient for two reasons:
- Compilation Path: The
python/requirements_compiled_py3.13.txtfile appears to be generated from the basepython/requirements/ml/train-requirements.txtrather than this file. The# viaannotations in the compiled file (e.g., line 433) confirm it pulls from the parent directory. Consequently, this change might be ignored during the next dependency resolution. - Scope of Regression: Since the breakage in
datasets4.0 is a major behavioral change affecting core components likeray.dataand evaluation metrics, it is safer to pindatasets==3.6.0in the basepython/requirements/ml/train-requirements.txt. This ensures all Python versions are protected from this regression upon re-compilation.
Consider moving this pin to the base requirement file and verifying that the compiled outputs are updated accordingly.
aslonnie
approved these changes
Apr 24, 2026
Lucas61000
pushed a commit
to Lucas61000/ray
that referenced
this pull request
May 15, 2026
…2926) requirements_compiled_py3.13.txt resolved `datasets` to 4.8.4 on this branch; master's py3.13 compiled file resolves 3.6.0. HF datasets 4.0 (July 2025) was a major break — removed script-based dataset support and changed schema/dtype behavior that cascades into ray.data.from_huggingface → iter_torch_batches → accelerate's gather_for_metrics. traingputests / traingpu2tests shards fail deterministically on //python/ray/train:accelerate_torch_trainer and :accelerate_torch_trainer_no_raydata with: File ".../evaluate_modules/.../glue.py", line 84, in simple_accuracy return float((preds == labels).mean()) AttributeError: 'bool' object has no attribute 'mean' This surfaces when `metric.add_batch` is never called (or preds and refs end up as scalars), so `[] == []` in the glue accuracy fn returns a Python bool instead of an ndarray. Pinning datasets to 3.6.0 matches the last-known-good CI baseline on master. Signed-off-by: elliot-barn <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
ArturNiederfahrenhorst
added a commit
to shorbaji/ray
that referenced
this pull request
Jun 12, 2026
…ers 5.x Coordinated bump of Ray's HuggingFace ML stack so it can run on datasets 4.x and huggingface-hub 1.x: - datasets: ==3.6.0 -> >=4.0.0,<5.0.0 (reverts the ray-project#62926 pin; the dtype regression it worked around in from_huggingface -> iter_torch_batches must be fixed as part of this change). - huggingface-hub: >=0.24.0 -> >=1.0,<2.0. - transformers: ==4.36.2 -> >=5.0,<6.0, accelerate: ==0.28.0 -> >=1.0. Every transformers 4.x (through 4.57) hard-caps huggingface-hub <1.0, so hf-hub 1.x requires transformers 5.x. Input-requirements only; the compiled lockfiles (requirements_compiled*.txt) and deplocks must be regenerated on x86 CI/forge (compile_pip_dependencies skips aarch64). Resolution verified coherent: the stack resolves to transformers 5.11.0 / datasets 4.8.5 / huggingface-hub 1.19.0 / tokenizers 0.22.2 / accelerate 1.14.0, and s3fs==2023.12.1's pinned fsspec stays within datasets 4.x's accepted range. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Artur Niederfahrenhorst <[email protected]>
ArturNiederfahrenhorst
added a commit
that referenced
this pull request
Jun 18, 2026
Coordinated bump of Ray's HuggingFace ML stack so it can run on datasets 4.x and huggingface-hub 1.x: - datasets: ==3.6.0 -> >=4.0.0,<5.0.0 (reverts the #62926 pin; verified the dtype regression it worked around in from_huggingface -> iter_torch_batches does NOT recur with datasets 4.x — the CPU train transformers tests pass on this branch). - huggingface-hub: >=0.24.0 -> >=1.0,<2.0. - transformers: ==4.36.2 -> >=5.0,<6.0, accelerate: ==0.28.0 -> >=1.0. Every transformers 4.x (through 4.57) hard-caps huggingface-hub <1.0, so hf-hub 1.x requires transformers 5.x. For the Ray Serve docs this means that we have to switch from model.translate(...) to model.generate() ( https://huggingface.co/docs/transformers/en/tasks/translation ) which impacts the text content around the relevant code changes and makes the PR bigger. Also, there is a small number of other places across the libraries that need attention. ## Follow-ups - **diffusers vs. transformers 5 in the ML release (BYOD) image:** this PR brings `transformers==5.11.0` alongside the pre-existing `diffusers==0.12.1` baseline pin in `release/ray_release/byod/requirements_ml_byod_3.{10,13}.in`. diffusers 0.12.1 targets the transformers 4.x era and should be upgraded --------- Signed-off-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
limarkdcunha
pushed a commit
to limarkdcunha/ray
that referenced
this pull request
Jun 30, 2026
Coordinated bump of Ray's HuggingFace ML stack so it can run on datasets 4.x and huggingface-hub 1.x: - datasets: ==3.6.0 -> >=4.0.0,<5.0.0 (reverts the ray-project#62926 pin; verified the dtype regression it worked around in from_huggingface -> iter_torch_batches does NOT recur with datasets 4.x — the CPU train transformers tests pass on this branch). - huggingface-hub: >=0.24.0 -> >=1.0,<2.0. - transformers: ==4.36.2 -> >=5.0,<6.0, accelerate: ==0.28.0 -> >=1.0. Every transformers 4.x (through 4.57) hard-caps huggingface-hub <1.0, so hf-hub 1.x requires transformers 5.x. For the Ray Serve docs this means that we have to switch from model.translate(...) to model.generate() ( https://huggingface.co/docs/transformers/en/tasks/translation ) which impacts the text content around the relevant code changes and makes the PR bigger. Also, there is a small number of other places across the libraries that need attention. ## Follow-ups - **diffusers vs. transformers 5 in the ML release (BYOD) image:** this PR brings `transformers==5.11.0` alongside the pre-existing `diffusers==0.12.1` baseline pin in `release/ray_release/byod/requirements_ml_byod_3.{10,13}.in`. diffusers 0.12.1 targets the transformers 4.x era and should be upgraded --------- Signed-off-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
Coordinated bump of Ray's HuggingFace ML stack so it can run on datasets 4.x and huggingface-hub 1.x: - datasets: ==3.6.0 -> >=4.0.0,<5.0.0 (reverts the ray-project#62926 pin; verified the dtype regression it worked around in from_huggingface -> iter_torch_batches does NOT recur with datasets 4.x — the CPU train transformers tests pass on this branch). - huggingface-hub: >=0.24.0 -> >=1.0,<2.0. - transformers: ==4.36.2 -> >=5.0,<6.0, accelerate: ==0.28.0 -> >=1.0. Every transformers 4.x (through 4.57) hard-caps huggingface-hub <1.0, so hf-hub 1.x requires transformers 5.x. For the Ray Serve docs this means that we have to switch from model.translate(...) to model.generate() ( https://huggingface.co/docs/transformers/en/tasks/translation ) which impacts the text content around the relevant code changes and makes the PR bigger. Also, there is a small number of other places across the libraries that need attention. ## Follow-ups - **diffusers vs. transformers 5 in the ML release (BYOD) image:** this PR brings `transformers==5.11.0` alongside the pre-existing `diffusers==0.12.1` baseline pin in `release/ray_release/byod/requirements_ml_byod_3.{10,13}.in`. diffusers 0.12.1 targets the transformers 4.x era and should be upgraded --------- Signed-off-by: Artur Niederfahrenhorst <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: 400Ping <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
requirements_compiled_py3.13.txt resolved
datasetsto 4.8.4 on this branch; master's py3.13 compiled file resolves 3.6.0. HF datasets 4.0 (July 2025) was a major break — removed script-based dataset support and changed schema/dtype behavior that cascades into ray.data.from_huggingface → iter_torch_batches → accelerate's gather_for_metrics.traingputests / traingpu2tests shards fail deterministically on //python/ray/train:accelerate_torch_trainer and
:accelerate_torch_trainer_no_raydata with:
This surfaces when
metric.add_batchis never called (or preds and refs end up as scalars), so[] == []in the glue accuracy fn returns a Python bool instead of an ndarray. Pinning datasets to 3.6.0 matches the last-known-good CI baseline on master.