Have interp use ds_idx, add tests #3332
Merged
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.
Summary of Changes
The
Interpretation
class now calls.new(shuffled=False, drop_last=False)
when generating theDataLoader
if none were found. This is similar to what is done duringget_preds
, and is needed as shuffling and dropping last will causeInterpretation
to complain about missing indexs (see issue here: #3248)Closes: #3051 and #3248
What This Does to the End Users
Allows them to specify
ds_idx=0
without raising any issues.Added Tests
I've changed the tests in
Interpretation
as a result of the current tests not being extensive enough.Before the tests were:
And while they do get the job done, they're not flexible enough for us to check if the training or validation dataset is doing okay, and that decoding went well (along with the rest of the pipeline).
As a result I've instead added in using the
MNIST_TINY
dataset, and a subsample of it:Now here are the associated tests:
It's a bit longer, but it does the same thing that the previous test did, but also takes into account us using the true
DataBlock
api, and adds a test for theds_idx=0
.Let me know if there are any suggestions, such as keeping that first test back in with addition to these, or having these in with
#slow
.cc @jph00 and @hamelsmu