DRAFT: Add class to package together multiple datasets#49
Open
amanchoudhri wants to merge 7 commits into
Open
Conversation
This commit allows the recently created `GerbilConcatDataset` to be instantiated elsewhere (for example in `main.py`) and passed into `Trainer`. In addition, it makes more semantic sense, since the `Trainer` class itself doesn't need to know about the way the data is stored.
Essentially, change the `data` arg to consume multiple values, packaging them into a list. Also add `proportions` and `data_random_seed` args to optionally specify random subset sizes of each dataset and the seed with which the subsets will be selected. This significantly simplifies my first-pass implementation, since the function `build_multi_source_datasets` still works perfectly even if only one source is provided (ie. the arg `data_dirs` is a list of length one). So I've removed my awkward first attempt, `build_datasets`. The main function can still be run exactly as before, but now it's just more flexible!
Copied from `main.py`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #48.