learn2learn
learn2learn copied to clipboard
Add TasksetSampler (compatible with non-classification tasks)
Description
Adds a sampler over tasks compatible with PyTorch's DataLoader (incl. num_workers > 1) which doesn't assume classification tasks.
If used for classification tasks (or others), it does not support any DataDescription transform (e.g., remapping the labels to 0-4 for a 5w5s tasks, or sorting the samples by labels).
This PR also deprecates the name TaskDataset in favor of Taskset, and includes some warning utilities. (TODO: decide if those changes are wise.)
Contribution Checklist
If your contribution modifies code in the core library (not docs, tests, or examples), please fill the following checklist.
- [ ] My contribution is listed in CHANGELOG.md with attribution.
- [x] My contribution modifies code in the main library.
- [ ] My modifications are tested.
- [ ] My modifications are documented.
Optional
If you make major changes to the core library, please run make alltests and copy-paste the content of alltests.txt below.
[PASTE HERE]