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
Added more descriptive error messages and hints for common usage mistakes #226
Merged
Conversation
This file contains 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
… keys() items() and values() to our NDict, and tried to highlight more the faulting op in pipeline ops error
* Changed default deepdiff behavior to ignore nans in comparison, * Added keys() items() and values() to our NDict (until now it returned empty iterables for those which is incorrect) * Tried to highlight more the faulting op in pipeline ops error
…le_ids. fixed a typo in samplers.py and added a describe method to NDict
…ing pipeline ops list
mosheraboh
approved these changes
Dec 8, 2022
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.
Great, thanks!
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.
When providing a a pipeline description, there are common pitfalls.
It's better to identify those common mistakes and provide clear instructions on how to fix it.
In this PR I added it for two cases:
Case 1:
You accidentally provide a class object instead of a class instance (very common mistake!)
Example exception message:
Exception: Error: expected an instance object, not a class object for <class 'fusedrug.data.protein.ops.aa_ops.OpToUpperCase'>
When creating a pipeline, such error can happen when you provide the following ops list description:
[SomeOp, {}]
instead of
[SomeOp(), {}]
Case 2:
you provided something that isn't a class or subclass of OpBase
Exception: Ops are expected to be instances of classes or subclasses of OpBase. The following op is not: 1234
In the future I think that we should also add: