-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
[minor] more verbose about a job's error #2500
Conversation
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.
Thanks @min-xu-ai!
@@ -186,6 +187,9 @@ def run_job( | |||
ret.return_value = task_function(task_cfg) | |||
ret.status = JobStatus.COMPLETED | |||
except Exception as e: | |||
name = "HYDRA_FULL_ERROR" | |||
if name in os.environ and os.environ[name] == "1": | |||
log.info(traceback.format_exc()) |
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.
better log.error
here, no?
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.
yeah, I agree. also, it is likely crash from here, so maybe that won't be missed in most cases.
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.
I've created followup PR #2549 changing the log level from INFO
to ERROR
.
If I am not mistaken, the exception is supposed to be printed downstream (especially if HYDRA_FULL_ERROR is set). |
But somehow it didn’t in my experiments |
@Jasha10, did you confirm this before accepting the patch? |
Yes. To confirm, I modified the file Here's what I observed:
|
A couple of things:
|
@Jasha10, this is also missing a unit test that will ensure it's not breaking in the future. |
This reverts commit 943024a per discussion in facebookresearch#2500 (comment)
Unlanding in #2556. |
When a job raises an exception, it seems to be swallowed. After this change, the backtrace shows up in main.log as well as the job's stdout file. See below