Fix tests#455
Merged
amit-sharma merged 6 commits intointerpretml:mainfrom May 25, 2025
Merged
Conversation
Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com>
Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com>
Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com>
Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com>
Collaborator
|
this is great! thank you for fixing the tests, @CloseChoice |
alanpar97
pushed a commit
to alanpar97/DiCE
that referenced
this pull request
May 27, 2025
* fix pytorch tests Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com> * fix tests Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com> * don't use formatting Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com> * fix issue Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com> * remove commented out code Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com> * simplify change Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com> --------- Signed-off-by: Tobias Pitters <tobias.pitters@gmail.com>
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.
This fixes the tests and should be backwards compatible.
The problem arose since in torch 2.6 (which is used for the tests) the
weights_onlyparameter's default was changed fromFalsetoTruewhich caused problems when loading the model. This PR fixes that.Furthermore the output of
self.transformer.transform(input_instance)contained booleans which cannot be cast to floats directly, therefore I do that manuallyAlso I updated the
dice_genetic.pyto handle 2d arrays correctly. Pls check whether this implementation is correct, I haven't had a look into the code and the functions in depth, just tried to guess what the code intends to do from the context.