Forward fix for DataLoader to accept custom Sharding DataPipe (#97287) (#98523)
Fixes #96975
Changes:
- Make sure custom ShardingDataPipe with `apply_sharding` can be used by `DataLoader`
- Allow the `apply_sharding` function without the last argument of `sharding_group`
- Make `DataLoader` not relying on `sharding_group`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97287
Approved by: https://github.com/NivekT
Co-authored-by: erjia <erjia@fb.com>