-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove dataset-specific trainers #286
Conversation
Just a note: I've recently been using kornia augmentations in the datamodule on a side project and one of the things I ran into was how to let the datamodule know if I'm loading data for a train/val/test set so that I can choose to augment or not. Found that you can access a bool attr def on_after_batch_transfer(self, batch, dataloader_idx):
if self.trainer.training:
# Augment only if loading for train_step
batch = augmentations(batch)
return batch |
Note that none of this code currently gets hit by our tests. We aren't using a |
c3c69bc
to
9657a67
Compare
9657a67
to
76f24fa
Compare
Note: I don't think we're adding the predictions to the batch before plotting, we probably should |
@@ -17,26 +16,6 @@ | |||
) | |||
|
|||
|
|||
class FakeExperiment(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to remove these in #329
Test failure is because the So2Sat dataset doesn't know how to plot any of the datamodule reduced band set options. We should probably move these to the dataset level. |
Another hiccup: |
You can access the plot method for Subset datasets like self.trainer.datamodule.val_dataset.dataset.plot. Not sure what workaround we should make for this. Edit: I think adding a plot method to each datamodule that just calls the dataset plot method is a decent solution. |
6bf2b19
to
1035d5e
Compare
ccfe068
to
e4f08d3
Compare
I believe the failing unit tests for Still haven't investigated the failing unit tests for |
* Remove dataset-specific trainers * Collation functions will be new in 0.2.0 * Clarify arg docstring * Style fixes * Remove files forgotten in rebase * Fix bug in unbind_samples, add tests * Fix bugs in datamodule augmentations * Increase coverage for datamodules * Fix bugs in logger plotting, properly test * Fix tests * Increase coverage of trainers * Use datamodule plot instead of dataset plot * Skip datamodules without tests * Plot predictions * Fix ClassificationTask tests * Fix SemanticSegmentationTask tests * EAFP -> LBYL * Ensure that tensors are on the CPU before plotting
Closes #205
Depends on #329
References: