Skip to content
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

Fix the get_preds(DatasetType.Train, ordered=True) #1815

Merged
merged 1 commit into from Mar 13, 2019

Conversation

PiotrCzapla
Copy link

The code currently tries to resort the predictions after it receives it from the super().get_preds unfortunately it fails to do so as it twice takes the order from the sampler which in case of randomized samplers is different each time.

A bit of dirty fix is to use the same random seed during get_pred and when getting the order from random sampler.
But it would be much better to make it possible to introduce an intereface to the sampler that let us disable the randomization.

The code currently tries to resort the predictions after it  receives it from the super().get_preds unfortunately it fails to do so as it twice takes the order from the sampler which in case of randomized samplers is different each time.

A bit of dirty fix is to use the same random seed during get_pred and when getting the order from  random sampler.
But it would be much better to make it possible to introduce an intereface to the sampler that let us disable the randomization.
@sgugger
Copy link
Contributor

sgugger commented Mar 13, 2019

This is a bit hacky but I can't think of another way, so merging. I'll change if I get a better idea. Thanks!

@sgugger sgugger merged commit 242d2fa into fastai:master Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants