Add size parameter to MedMNIST for MedMNIST+ multi-resolution support; Consolidate DSprites variants into a single config-based class; Added 4 Fine-grained datasets#52
Open
haodongzhang0118 wants to merge 11 commits into
Conversation
- Resolved dsprites.py and med_mnist.py conflicts - Migrated EuroSAT/OxfordPet/PlantVillage/StanfordDogs to stable_datasets.schema
The base BaseDatasetBuilder dropped extra kwargs passed to the constructor, so MedMNIST(config_name="pathmnist", size=64) silently fell back to the default size=28: the URL pointed at the right NPZ but the resulting dataset was 28x28. - BaseDatasetBuilder.__init__ now applies extra kwargs as overrides on a shallow copy of the matched BUILDER_CONFIGS template (and rejects unknown fields and unexpected kwargs on no-config builders). - cache_fingerprint accepts an optional extra discriminator; passing the empty default preserves existing cache directory names. - BaseDatasetBuilder.__new__ derives that extra from the diff between the instance config and its template, so distinct overrides produce distinct Arrow caches and don't collide on a stale shard. Without the cache change, the second fix alone would still return the 28x28 shard already written by an earlier run.
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.
What does this PR do?
sizeconfig parameter toMedMNIST, enabling users to load MedMNIST+ larger resolution variants (64, 128, 224 for 2D; 64 for 3D) in addition to the default 28x28 MNIST-like size.sizeparameter and usage.Who can review?
@Leon-Leyang