with_format() function returns bytes instead of PIL images even when image column is not part of "columns"
COLLABORATOR
Thanks for reporting! I've opened a PR with a fix.
2023-10-31T19:58:56Z
https://github.com/huggingface/datasets/issues/6366#issuecomment-1787947628
https://api.github.com/repos/huggingface/datasets/issues/6366
IC_kwDODunzps5qkeps
https://api.github.com/repos/huggingface/datasets/issues/comments/1787947628/reactions
2023-10-31T19:58:56Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1787947628
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
### Describe the bug

When using the with_format() function on a dataset containing images, even if the image column is not part of the columns provided in the function, its type will be changed to bytes.
Here is a minimal reproduction of the bug:
https://colab.research.google.com/drive/1hyaOspgyhB41oiR1-tXE3k_gJCdJUQCf?usp=sharing

### Steps to reproduce the bug

1. Load the image dataset
2. apply with_format(columns=["text"])
3. Check the type of images in the "image" column before and after applying with_format

### Expected behavior

The type should stay the same, but it does not

### Environment info

datasets==2.14.6
