sd1.5 diffusers controlnet training script gives new error
NONE
not sure why the issue is formatting oddly
2024-09-25T01:46:03Z
https://github.com/huggingface/datasets/issues/7168#issuecomment-2372714146
https://api.github.com/repos/huggingface/datasets/issues/7168
IC_kwDODunzps6NbL6i
https://api.github.com/repos/huggingface/datasets/issues/comments/2372714146/reactions
2024-09-25T01:46:03Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2372714146
https://avatars.githubusercontent.com/u/90132896?v=4
https://api.github.com/users/Night1099/events{/privacy}
https://api.github.com/users/Night1099/followers
https://api.github.com/users/Night1099/following{/other_user}
https://api.github.com/users/Night1099/gists{/gist_id}
https://github.com/Night1099
Night1099
MDQ6VXNlcjkwMTMyODk2
https://api.github.com/users/Night1099/orgs
https://api.github.com/users/Night1099/received_events
https://api.github.com/users/Night1099/repos
https://api.github.com/users/Night1099/starred{/owner}{/repo}
https://api.github.com/users/Night1099/subscriptions
User
https://api.github.com/users/Night1099
public
NONE
I guess this is a dupe of

https://github.com/huggingface/datasets/issues/7071
2024-09-26T04:24:07Z
https://github.com/huggingface/datasets/issues/7168#issuecomment-2375842792
https://api.github.com/repos/huggingface/datasets/issues/7168
IC_kwDODunzps6NnHvo
https://api.github.com/repos/huggingface/datasets/issues/comments/2375842792/reactions
2024-09-26T04:24:07Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2375842792
https://avatars.githubusercontent.com/u/90132896?v=4
https://api.github.com/users/Night1099/events{/privacy}
https://api.github.com/users/Night1099/followers
https://api.github.com/users/Night1099/following{/other_user}
https://api.github.com/users/Night1099/gists{/gist_id}
https://github.com/Night1099
Night1099
MDQ6VXNlcjkwMTMyODk2
https://api.github.com/users/Night1099/orgs
https://api.github.com/users/Night1099/received_events
https://api.github.com/users/Night1099/repos
https://api.github.com/users/Night1099/starred{/owner}{/repo}
https://api.github.com/users/Night1099/subscriptions
User
https://api.github.com/users/Night1099
public
NONE
this turned out to be because of a bad image in dataset
2024-09-30T05:24:03Z
https://github.com/huggingface/datasets/issues/7168#issuecomment-2382139165
https://api.github.com/repos/huggingface/datasets/issues/7168
IC_kwDODunzps6N_I8d
https://api.github.com/repos/huggingface/datasets/issues/comments/2382139165/reactions
2024-09-30T05:24:03Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2382139165
https://avatars.githubusercontent.com/u/90132896?v=4
https://api.github.com/users/Night1099/events{/privacy}
https://api.github.com/users/Night1099/followers
https://api.github.com/users/Night1099/following{/other_user}
https://api.github.com/users/Night1099/gists{/gist_id}
https://github.com/Night1099
Night1099
MDQ6VXNlcjkwMTMyODk2
https://api.github.com/users/Night1099/orgs
https://api.github.com/users/Night1099/received_events
https://api.github.com/users/Night1099/repos
https://api.github.com/users/Night1099/starred{/owner}{/repo}
https://api.github.com/users/Night1099/subscriptions
User
https://api.github.com/users/Night1099
public
### Describe the bug

This will randomly pop up during training now

```
Traceback (most recent call last):
  File "/workspace/diffusers/examples/controlnet/train_controlnet.py", line 1192, in <module>
    main(args)
  File "/workspace/diffusers/examples/controlnet/train_controlnet.py", line 1041, in main
    for step, batch in enumerate(train_dataloader):
  File "/usr/local/lib/python3.11/dist-packages/accelerate/data_loader.py", line 561, in __iter__
    next_batch = next(dataloader_iter)
                 ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/utils/data/dataloader.py", line 630, in __next__
    data = self._next_data()
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/utils/data/dataloader.py", line 673, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/utils/data/_utils/fetch.py", line 50, in fetch
    data = self.dataset.__getitems__(possibly_batched_index)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/datasets/arrow_dataset.py", line 2746, in __getitems__
    batch = self.__getitem__(keys)
            ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/datasets/arrow_dataset.py", line 2742, in __getitem__
    return self._getitem(key)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/datasets/arrow_dataset.py", line 2727, in _getitem
    formatted_output = format_table(
                       ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/datasets/formatting/formatting.py", line 639, in format_table
    return formatter(pa_table, query_type=query_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/datasets/formatting/formatting.py", line 407, in __call__
    return self.format_batch(pa_table)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/datasets/formatting/formatting.py", line 521, in format_batch
    batch = self.python_features_decoder.decode_batch(batch)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/datasets/formatting/formatting.py", line 228, in decode_batch
    return self.features.decode_batch(batch) if self.features else batch
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/datasets/features/features.py", line 2084, in decode_batch
    [
  File "/usr/local/lib/python3.11/dist-packages/datasets/features/features.py", line 2085, in <listcomp>
    decode_nested_example(self[column_name], value, token_per_repo_id=token_per_repo_id)
  File "/usr/local/lib/python3.11/dist-packages/datasets/features/features.py", line 1403, in decode_nested_example
    return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/datasets/features/image.py", line 188, in decode_example
    image.load()  # to avoid "Too many open files" errors

    ```

### Steps to reproduce the bug

Train on diffusers sd1.5 controlnet example script

This will pop up randomly, you can see in wandb below when i manually resume run everytime this error appears

![image](https://github.com/user-attachments/assets/87e9a6af-cb3c-4398-82e7-d6a90add8d31)


### Expected behavior

Training to continue without above error

### Environment info

- datasets version: 3.0.0
- Platform: Linux-6.5.0-44-generic-x86_64-with-glibc2.35
- Python version: 3.11.9
- huggingface_hub version: 0.25.1
- PyArrow version: 17.0.0
- Pandas version: 2.2.3
- fsspec version: 2024.6.1

Training on 4090