load_dataset() in 4.0.0 failed when decoding audio
NONE
Hi @lhoestq . Would you please have a look at it? I use the official NV Docker ([NV official docker image](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch): `nvcr.io/nvidia/pytorch:25.06-py3`) on A100 and encountered this issue, but I don't know how to fix it.
2025-07-29T03:27:18Z
https://github.com/huggingface/datasets/issues/7707#issuecomment-3130505493
https://api.github.com/repos/huggingface/datasets/issues/7707
IC_kwDODunzps66l7kV
https://api.github.com/repos/huggingface/datasets/issues/comments/3130505493/reactions
2025-07-29T05:48:21Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3130505493
https://avatars.githubusercontent.com/u/107918818?v=4
https://api.github.com/users/jiqing-feng/events{/privacy}
https://api.github.com/users/jiqing-feng/followers
https://api.github.com/users/jiqing-feng/following{/other_user}
https://api.github.com/users/jiqing-feng/gists{/gist_id}
https://github.com/jiqing-feng
jiqing-feng
U_kgDOBm614g
https://api.github.com/users/jiqing-feng/orgs
https://api.github.com/users/jiqing-feng/received_events
https://api.github.com/users/jiqing-feng/repos
https://api.github.com/users/jiqing-feng/starred{/owner}{/repo}
https://api.github.com/users/jiqing-feng/subscriptions
User
https://api.github.com/users/jiqing-feng
public
NONE
Use !pip install -U datasets[audio] rather than !pip install datasets

I got the solution from this link [https://github.com/huggingface/datasets/issues/7678](https://github.com/huggingface/datasets/issues/7678), and it processes the data; however,  it led to certain transformer importnerrors
2025-07-29T13:50:33Z
https://github.com/huggingface/datasets/issues/7707#issuecomment-3132627446
https://api.github.com/repos/huggingface/datasets/issues/7707
IC_kwDODunzps66uBn2
https://api.github.com/repos/huggingface/datasets/issues/comments/3132627446/reactions
2025-07-30T15:11:23Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3132627446
https://avatars.githubusercontent.com/u/107439558?v=4
https://api.github.com/users/asantewaa-bremang/events{/privacy}
https://api.github.com/users/asantewaa-bremang/followers
https://api.github.com/users/asantewaa-bremang/following{/other_user}
https://api.github.com/users/asantewaa-bremang/gists{/gist_id}
https://github.com/asantewaa-bremang
asantewaa-bremang
U_kgDOBmdlxg
https://api.github.com/users/asantewaa-bremang/orgs
https://api.github.com/users/asantewaa-bremang/received_events
https://api.github.com/users/asantewaa-bremang/repos
https://api.github.com/users/asantewaa-bremang/starred{/owner}{/repo}
https://api.github.com/users/asantewaa-bremang/subscriptions
User
https://api.github.com/users/asantewaa-bremang
public
NONE
> https://github.com/huggingface/datasets/issues/7678

Hi @asantewaa-bremang . Thanks for your reply, but sadly it does not work for me.
2025-07-30T01:06:25Z
https://github.com/huggingface/datasets/issues/7707#issuecomment-3134550394
https://api.github.com/repos/huggingface/datasets/issues/7707
IC_kwDODunzps661XF6
https://api.github.com/repos/huggingface/datasets/issues/comments/3134550394/reactions
2025-07-30T01:06:25Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3134550394
https://avatars.githubusercontent.com/u/107918818?v=4
https://api.github.com/users/jiqing-feng/events{/privacy}
https://api.github.com/users/jiqing-feng/followers
https://api.github.com/users/jiqing-feng/following{/other_user}
https://api.github.com/users/jiqing-feng/gists{/gist_id}
https://github.com/jiqing-feng
jiqing-feng
U_kgDOBm614g
https://api.github.com/users/jiqing-feng/orgs
https://api.github.com/users/jiqing-feng/received_events
https://api.github.com/users/jiqing-feng/repos
https://api.github.com/users/jiqing-feng/starred{/owner}{/repo}
https://api.github.com/users/jiqing-feng/subscriptions
User
https://api.github.com/users/jiqing-feng
public
MEMBER
It looks like a torchcodec issue, have you tried to look at the torchcodec issues here in case someone has the same issue ? https://github.com/pytorch/torchcodec/issues

otherwise feel free to open a new issue there
2025-07-30T15:13:48Z
https://github.com/huggingface/datasets/issues/7707#issuecomment-3136790067
https://api.github.com/repos/huggingface/datasets/issues/7707
IC_kwDODunzps66954z
https://api.github.com/repos/huggingface/datasets/issues/comments/3136790067/reactions
2025-07-30T15:13:48Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3136790067
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
NONE
@jiqing-feng, are you running the code on Colab? If you are, you should restart after making this installation ! pip install -U datasets[audio]. 
2025-07-30T16:38:50Z
https://github.com/huggingface/datasets/issues/7707#issuecomment-3137087580
https://api.github.com/repos/huggingface/datasets/issues/7707
IC_kwDODunzps66_Chc
https://api.github.com/repos/huggingface/datasets/issues/comments/3137087580/reactions
2025-07-30T16:38:50Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3137087580
https://avatars.githubusercontent.com/u/107439558?v=4
https://api.github.com/users/asantewaa-bremang/events{/privacy}
https://api.github.com/users/asantewaa-bremang/followers
https://api.github.com/users/asantewaa-bremang/following{/other_user}
https://api.github.com/users/asantewaa-bremang/gists{/gist_id}
https://github.com/asantewaa-bremang
asantewaa-bremang
U_kgDOBmdlxg
https://api.github.com/users/asantewaa-bremang/orgs
https://api.github.com/users/asantewaa-bremang/received_events
https://api.github.com/users/asantewaa-bremang/repos
https://api.github.com/users/asantewaa-bremang/starred{/owner}{/repo}
https://api.github.com/users/asantewaa-bremang/subscriptions
User
https://api.github.com/users/asantewaa-bremang
public
NONE
> [@jiqing-feng](https://github.com/jiqing-feng), are you running the code on Colab? If you are, you should restart after making this installation ! pip install -U datasets[audio].

No, I ran the script on the A100 instance locally.
2025-07-31T01:02:58Z
https://github.com/huggingface/datasets/issues/7707#issuecomment-3138255744
https://api.github.com/repos/huggingface/datasets/issues/7707
IC_kwDODunzps67DfuA
https://api.github.com/repos/huggingface/datasets/issues/comments/3138255744/reactions
2025-07-31T01:02:58Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3138255744
https://avatars.githubusercontent.com/u/107918818?v=4
https://api.github.com/users/jiqing-feng/events{/privacy}
https://api.github.com/users/jiqing-feng/followers
https://api.github.com/users/jiqing-feng/following{/other_user}
https://api.github.com/users/jiqing-feng/gists{/gist_id}
https://github.com/jiqing-feng
jiqing-feng
U_kgDOBm614g
https://api.github.com/users/jiqing-feng/orgs
https://api.github.com/users/jiqing-feng/received_events
https://api.github.com/users/jiqing-feng/repos
https://api.github.com/users/jiqing-feng/starred{/owner}{/repo}
https://api.github.com/users/jiqing-feng/subscriptions
User
https://api.github.com/users/jiqing-feng
public
NONE
> It looks like a torchcodec issue, have you tried to look at the torchcodec issues here in case someone has the same issue ? https://github.com/pytorch/torchcodec/issues
> 
> otherwise feel free to open a new issue there

Thanks! I've opened a new issue on torchcodec. Could we have a fallback implementation without torchcodec (just like datasets==3.6.0) ?
2025-07-31T03:00:54Z
https://github.com/huggingface/datasets/issues/7707#issuecomment-3138406828
https://api.github.com/repos/huggingface/datasets/issues/7707
IC_kwDODunzps67EEms
https://api.github.com/repos/huggingface/datasets/issues/comments/3138406828/reactions
2025-07-31T03:01:09Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3138406828
https://avatars.githubusercontent.com/u/107918818?v=4
https://api.github.com/users/jiqing-feng/events{/privacy}
https://api.github.com/users/jiqing-feng/followers
https://api.github.com/users/jiqing-feng/following{/other_user}
https://api.github.com/users/jiqing-feng/gists{/gist_id}
https://github.com/jiqing-feng
jiqing-feng
U_kgDOBm614g
https://api.github.com/users/jiqing-feng/orgs
https://api.github.com/users/jiqing-feng/received_events
https://api.github.com/users/jiqing-feng/repos
https://api.github.com/users/jiqing-feng/starred{/owner}{/repo}
https://api.github.com/users/jiqing-feng/subscriptions
User
https://api.github.com/users/jiqing-feng
public
MEMBER
> Thanks! I've opened a new issue on torchcodec. Could we have a fallback implementation without torchcodec (just like datasets==3.6.0) ?

For now I'd recommend using `datasets==3.6.0` if this issue is blocking for you
2025-07-31T16:17:43Z
https://github.com/huggingface/datasets/issues/7707#issuecomment-3140560731
https://api.github.com/repos/huggingface/datasets/issues/7707
IC_kwDODunzps67MSdb
https://api.github.com/repos/huggingface/datasets/issues/comments/3140560731/reactions
2025-07-31T16:17:43Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3140560731
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
NONE
Resolved by installing the pre-release torchcodec. Thanks!
2025-08-01T05:15:45Z
https://github.com/huggingface/datasets/issues/7707#issuecomment-3142202121
https://api.github.com/repos/huggingface/datasets/issues/7707
IC_kwDODunzps67SjMJ
https://api.github.com/repos/huggingface/datasets/issues/comments/3142202121/reactions
2025-08-01T05:15:45Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3142202121
https://avatars.githubusercontent.com/u/107918818?v=4
https://api.github.com/users/jiqing-feng/events{/privacy}
https://api.github.com/users/jiqing-feng/followers
https://api.github.com/users/jiqing-feng/following{/other_user}
https://api.github.com/users/jiqing-feng/gists{/gist_id}
https://github.com/jiqing-feng
jiqing-feng
U_kgDOBm614g
https://api.github.com/users/jiqing-feng/orgs
https://api.github.com/users/jiqing-feng/received_events
https://api.github.com/users/jiqing-feng/repos
https://api.github.com/users/jiqing-feng/starred{/owner}{/repo}
https://api.github.com/users/jiqing-feng/subscriptions
User
https://api.github.com/users/jiqing-feng
public
### Describe the bug

Cannot decode audio data.



### Steps to reproduce the bug

```python
from datasets import load_dataset

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
print(dataset[0]["audio"]["array"])
```

1st round run, got
```
  File "/usr/local/lib/python3.12/dist-packages/datasets/features/audio.py", line 172, in decode_example
    raise ImportError("To support decoding audio data, please install 'torchcodec'.")
ImportError: To support decoding audio data, please install 'torchcodec'.
```

After `pip install torchcodec` and run, got
```
  File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/_metadata.py", line 16, in <module>
    from torchcodec._core.ops import (
  File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 84, in <module>
    load_torchcodec_shared_libraries()
  File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 69, in load_torchcodec_shared_libraries
    raise RuntimeError(
RuntimeError: Could not load libtorchcodec. Likely causes:
          1. FFmpeg is not properly installed in your environment. We support
             versions 4, 5, 6 and 7.
          2. The PyTorch version (2.8.0a0+5228986c39.nv25.06) is not compatible with
             this version of TorchCodec. Refer to the version compatibility
             table:
             https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec.
          3. Another runtime dependency; see exceptions below.
        The following exceptions were raised as we tried to load libtorchcodec:

[start of libtorchcodec loading traceback]
FFmpeg version 7: libavutil.so.59: cannot open shared object file: No such file or directory
FFmpeg version 6: libavutil.so.58: cannot open shared object file: No such file or directory
FFmpeg version 5: libavutil.so.57: cannot open shared object file: No such file or directory
FFmpeg version 4: libavutil.so.56: cannot open shared object file: No such file or directory
[end of libtorchcodec loading traceback].
```

After `apt update && apt install ffmpeg -y`, got
```
Traceback (most recent call last):
  File "/workspace/jiqing/test_datasets.py", line 4, in <module>
    print(dataset[0]["audio"]["array"])
          ~~~~~~~^^^
  File "/usr/local/lib/python3.12/dist-packages/datasets/arrow_dataset.py", line 2859, in __getitem__
    return self._getitem(key)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/datasets/arrow_dataset.py", line 2841, in _getitem
    formatted_output = format_table(
                       ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/datasets/formatting/formatting.py", line 657, in format_table
    return formatter(pa_table, query_type=query_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/datasets/formatting/formatting.py", line 410, in __call__
    return self.format_row(pa_table)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/datasets/formatting/formatting.py", line 459, in format_row
    row = self.python_features_decoder.decode_row(row)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/datasets/formatting/formatting.py", line 223, in decode_row
    return self.features.decode_example(row, token_per_repo_id=self.token_per_repo_id) if self.features else row
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/datasets/features/features.py", line 2093, in decode_example
    column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/datasets/features/features.py", line 1405, in decode_nested_example
    return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/datasets/features/audio.py", line 198, in decode_example
    audio = AudioDecoder(bytes, stream_index=self.stream_index, sample_rate=self.sampling_rate)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torchcodec/decoders/_audio_decoder.py", line 62, in __init__
    self._decoder = create_decoder(source=source, seek_mode="approximate")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torchcodec/decoders/_decoder_utils.py", line 33, in create_decoder
    return core.create_from_bytes(source, seek_mode)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 144, in create_from_bytes
    return create_from_tensor(buffer, seek_mode)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 756, in __call__
    return self._op(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
NotImplementedError: Could not run 'torchcodec_ns::create_from_tensor' with arguments from the 'CPU' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. 'torchcodec_ns::create_from_tensor' is only available for these backends: [Meta, BackendSelect, Python, FuncTorchDynamicLayerBackMode, Functionalize, Named, Conjugate, Negative, ZeroTensor, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradMPS, AutogradXPU, AutogradHPU, AutogradLazy, AutogradMTIA, AutogradMAIA, AutogradMeta, Tracer, AutocastCPU, AutocastMTIA, AutocastMAIA, AutocastXPU, AutocastMPS, AutocastCUDA, FuncTorchBatched, BatchedNestedTensor, FuncTorchVmapMode, Batched, VmapMode, FuncTorchGradWrapper, PythonTLSSnapshot, FuncTorchDynamicLayerFrontMode, PreDispatch, PythonDispatcher].

Meta: registered at /dev/null:214 [kernel]
BackendSelect: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/core/BackendSelectFallbackKernel.cpp:3 [backend fallback]
Python: registered at /__w/torchcodec/torchcodec/pytorch/torchcodec/src/torchcodec/_core/custom_ops.cpp:694 [kernel]
FuncTorchDynamicLayerBackMode: registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/DynamicLayer.cpp:479 [backend fallback]
Functionalize: registered at /opt/pytorch/pytorch/aten/src/ATen/FunctionalizeFallbackKernel.cpp:349 [backend fallback]
Named: registered at /opt/pytorch/pytorch/aten/src/ATen/core/NamedRegistrations.cpp:7 [backend fallback]
Conjugate: registered at /opt/pytorch/pytorch/aten/src/ATen/ConjugateFallback.cpp:17 [backend fallback]
Negative: registered at /opt/pytorch/pytorch/aten/src/ATen/native/NegateFallback.cpp:18 [backend fallback]
ZeroTensor: registered at /opt/pytorch/pytorch/aten/src/ATen/ZeroTensorFallback.cpp:86 [backend fallback]
ADInplaceOrView: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:104 [backend fallback]
AutogradOther: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:63 [backend fallback]
AutogradCPU: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:67 [backend fallback]
AutogradCUDA: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:75 [backend fallback]
AutogradXLA: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:87 [backend fallback]
AutogradMPS: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:95 [backend fallback]
AutogradXPU: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:71 [backend fallback]
AutogradHPU: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:108 [backend fallback]
AutogradLazy: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:91 [backend fallback]
AutogradMTIA: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:79 [backend fallback]
AutogradMAIA: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:83 [backend fallback]
AutogradMeta: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:99 [backend fallback]
Tracer: registered at /opt/pytorch/pytorch/torch/csrc/autograd/TraceTypeManual.cpp:294 [backend fallback]
AutocastCPU: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:322 [backend fallback]
AutocastMTIA: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:466 [backend fallback]
AutocastMAIA: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:504 [backend fallback]
AutocastXPU: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:542 [backend fallback]
AutocastMPS: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:209 [backend fallback]
AutocastCUDA: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:165 [backend fallback]
FuncTorchBatched: registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/LegacyBatchingRegistrations.cpp:731 [backend fallback]
BatchedNestedTensor: registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/LegacyBatchingRegistrations.cpp:758 [backend fallback]
FuncTorchVmapMode: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/VmapModeRegistrations.cpp:27 [backend fallback]
Batched: registered at /opt/pytorch/pytorch/aten/src/ATen/LegacyBatchingRegistrations.cpp:1075 [backend fallback]
VmapMode: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/VmapModeRegistrations.cpp:33 [backend fallback]
FuncTorchGradWrapper: registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/TensorWrapper.cpp:208 [backend fallback]
PythonTLSSnapshot: registered at /opt/pytorch/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:202 [backend fallback]
FuncTorchDynamicLayerFrontMode: registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/DynamicLayer.cpp:475 [backend fallback]
PreDispatch: registered at /opt/pytorch/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:206 [backend fallback]
PythonDispatcher: registered at /opt/pytorch/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:198 [backend fallback]
```

### Expected behavior

The result is 
```
[0.00238037 0.0020752  0.00198364 ... 0.00042725 0.00057983 0.0010376 ]
```
on `datasets==3.6.0`

### Environment info

[NV official docker image](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch): `nvcr.io/nvidia/pytorch:25.06-py3` 

```
- `datasets` version: 4.0.0
- Platform: Linux-5.4.292-1.el8.elrepo.x86_64-x86_64-with-glibc2.39
- Python version: 3.12.3
- `huggingface_hub` version: 0.34.2
- PyArrow version: 19.0.1
- Pandas version: 2.2.3
- `fsspec` version: 2025.3.0
```