-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Deterministic order for load_sample_images #13250
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
[MRG] Deterministic order for load_sample_images #13250
Conversation
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.
this is what I mean :) |
Please add an entry to the change log at |
sklearn/feature_extraction/image.py
Outdated
@@ -523,6 +534,3 @@ def transform(self, X): | |||
patches[ii * n_patches:(ii + 1) * n_patches] = extract_patches_2d( | |||
image, patch_size, self.max_patches, self.random_state) | |||
return patches | |||
|
|||
def _more_tags(self): |
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.
?
doc/whats_new/v0.20.rst
Outdated
@@ -225,6 +225,9 @@ Changelog | |||
- |Fix| :func:`datasets.fetch_openml` to retry downloading when reading | |||
from local cache fails. :issue:`12517` by :user:`Thomas Fan <thomasjpfan>`. | |||
|
|||
- |Fix| :func:`datasets.load_sample_images` returns images with a deterministic |
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.
Seems that Joel labelled the issues as 0.20.3, so I think it's acceptable.
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.
I think I labelled it as 0.20.3 by mistake. The doctest isn't in 0.20. I'd rather this fix in 0.21
@thomasjpfan please update the PR body to close all related issues/PRs |
Sorry didn't see this and dupicated the issue. |
Everything is moving fast! I think #13249 is still the right fix for the doctest, as it was ugly to just extract [0] from all images anyway. Better to load a specific image. But this should be fixed too. |
For the This (small) fix is still needed to make sure |
…-learn#13250)" This reverts commit 7831db7.
…-learn#13250)" This reverts commit 7831db7.
Reference Issues/PRs
Fixes #13152
Fixes #13250
Closes #13178
Closes #13249
What does this implement/fix? Explain your changes.
This PR makes sure that the output of
os.listdir
has a deterministic order inload_sample_images
.Any other comments?
Sometimes the "flower.jpg" image is used instead of "china.jpg" in the
extract_patches_2d
's doctest.