Classes label error when loading symbolic links using imagefolder
NONE
It can be solved temporarily  by remove `resolve` in 
https://github.com/huggingface/datasets/blob/bef23be3d9543b1ca2da87ab2f05070201044ddc/src/datasets/data_files.py#L278
2022-10-11T07:15:13Z
https://github.com/huggingface/datasets/issues/5098#issuecomment-1274195890
https://api.github.com/repos/huggingface/datasets/issues/5098
IC_kwDODunzps5L8q-y
https://api.github.com/repos/huggingface/datasets/issues/comments/1274195890/reactions
2022-10-11T07:15:25Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1274195890
https://avatars.githubusercontent.com/u/49552732?v=4
https://api.github.com/users/horizon86/events{/privacy}
https://api.github.com/users/horizon86/followers
https://api.github.com/users/horizon86/following{/other_user}
https://api.github.com/users/horizon86/gists{/gist_id}
https://github.com/horizon86
horizon86
MDQ6VXNlcjQ5NTUyNzMy
https://api.github.com/users/horizon86/orgs
https://api.github.com/users/horizon86/received_events
https://api.github.com/users/horizon86/repos
https://api.github.com/users/horizon86/starred{/owner}{/repo}
https://api.github.com/users/horizon86/subscriptions
User
https://api.github.com/users/horizon86
public
COLLABORATOR
Hi, thanks for reporting and suggesting a fix! We still need to account for `.`/`..` in the file path, so a more robust fix would be `Path(os.path.abspath(filepath))`.
2022-10-17T12:43:03Z
https://github.com/huggingface/datasets/issues/5098#issuecomment-1280799183
https://api.github.com/repos/huggingface/datasets/issues/5098
IC_kwDODunzps5MV3HP
https://api.github.com/repos/huggingface/datasets/issues/comments/1280799183/reactions
2022-10-17T12:43:03Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1280799183
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
NONE
> Hi, thanks for reporting and suggesting a fix! We still need to account for `.`/`..` in the file path, so a more robust fix would be `Path(os.path.abspath(filepath))`.

Thanks for your reply!
2022-10-17T14:36:37Z
https://github.com/huggingface/datasets/issues/5098#issuecomment-1280965019
https://api.github.com/repos/huggingface/datasets/issues/5098
IC_kwDODunzps5MWfmb
https://api.github.com/repos/huggingface/datasets/issues/comments/1280965019/reactions
2022-10-17T14:36:37Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1280965019
https://avatars.githubusercontent.com/u/49552732?v=4
https://api.github.com/users/horizon86/events{/privacy}
https://api.github.com/users/horizon86/followers
https://api.github.com/users/horizon86/following{/other_user}
https://api.github.com/users/horizon86/gists{/gist_id}
https://github.com/horizon86
horizon86
MDQ6VXNlcjQ5NTUyNzMy
https://api.github.com/users/horizon86/orgs
https://api.github.com/users/horizon86/received_events
https://api.github.com/users/horizon86/repos
https://api.github.com/users/horizon86/starred{/owner}{/repo}
https://api.github.com/users/horizon86/subscriptions
User
https://api.github.com/users/horizon86
public
**Is your feature request related to a problem? Please describe.**
Like this: #4015
When there are **symbolic links** to pictures in the data folder, the parent folder name of the **real file** will be used as the class name instead of the parent folder of the symbolic link itself. Can you give an option to decide whether to enable symbolic link tracking?

This is inconsistent with the `torchvision.datasets.ImageFolder` behavior.

For example:
![image](https://user-images.githubusercontent.com/49552732/195008591-3cce644e-aabe-4f39-90b9-832861cadb3d.png)
![image](https://user-images.githubusercontent.com/49552732/195008841-0b0c2289-eb7f-411a-977b-37426f23a277.png)

It use `others` in green circle as class label but not `abnormal`, I wish `load_dataset` not use the real file parent as label.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context about the feature request here.
