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.
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
handle frame in stack trace that doesn't have a module #1741
handle frame in stack trace that doesn't have a module #1741
Changes from 11 commits
42eca87
fc1f24f
1d07372
81e0c75
953fc55
ad6be1f
e7218d1
a9a02d4
80f1bb2
6a6e665
90a7451
69379e0
7de5282
7d74b9a
3bf3e48
cf7bbbf
33d471d
a48a21b
118ab6a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you explain the testing logic?
The test is surprisingly large.
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.
Sorry about that.
This is not just testing the new functionality. It is also testing the pre-existing
run_and_report
behavior.The
run_and_report
function has the following signature:There are three test methods:
test_success
tests whenrun_and_report
runsfunc
successfully.test_failure
tests whenfunc
raises an exception andrun_and_report
is able to print a nicely-formatted error message.test_simplified_traceback_failure
tests whenfunc
raises an exception andrun_and_report
is not able to print a nicely-formatted error message -- this is the case where the original exception gets re-raised.There are four
@staticmethod
definitions. These are passed in torun_and_report
as thefunc
argument. They are designed to trigger different logic code paths inside ofrun_and_report
:success_func
raises no exceptionsimple_error
raises anAssertionError
run_job_wrapper
triggers the special logic inrun_and_report
that looks for a function called"run_job"
in the stack, and strips away the leading stack framesomegaconf_job_wrapper
triggers the special logic inrun_and_report
that looks for theomegaconf
module in the stack, and strips away the bottom stack framesThere 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.
Gotcha.
Thanks for adding this. Can you add a comment describing this in the test class?
(does not need to be as detailed).