Repository navigation
Include is_counts_based in CircularFingerprint eq and hash - #5206
Open
barlowa124 wants to merge 1 commit into
Open
barlowa124 wants to merge 1 commit into
barlowa124 wants to merge 1 commit into
Conversation
…eepchem#5169) Featurizers differing only in is_counts_based compared and hashed equal while producing different features (bit vector vs counts), so they collapsed to one entry in sets and dicts and silently swapped features in code that caches featurizers by value.
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.
Closes #5169.
CircularFingerprint.__eq__and__hash__omittedis_counts_based, even though that flag changes what_featurizeproduces. Two featurizers differing only in that flagthen compared equal and hashed the same, so a set collapsed them
into one entry while they produced different features.
The field is now part of both the equality tuple and the hash
tuple, matching the repr.
A new test asserts that bit and counts
featurizers are unequal members of a set, and that identical
configurations still compare equal. The featurization test module is green.