Skip to content
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

Use log.exception in run_job failure case #2549

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jasha10
Copy link
Collaborator

@Jasha10 Jasha10 commented Jan 14, 2023

This is a followup to PR #2500, which introduced logging for exceptions raised during a job.
This PR increases the log level from INFO to ERROR.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 14, 2023
Comment on lines -192 to +191
log.info(traceback.format_exc())
log.exception("Got error while running job")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using log.exception takes care of printing the traceback.

@Jasha10
Copy link
Collaborator Author

Jasha10 commented Jan 14, 2023

Should we consider changing to log the exception in all cases, even if HYDRA_FULL_ERROR is not set? Currently, if HYDRA_FULL_ERROR is not set, multirun sweeps could have silent job failure (see my comment on #2500).

@min-xu-ai
Copy link

Should we consider changing to log the exception in all cases, even if HYDRA_FULL_ERROR is not set? Currently, if HYDRA_FULL_ERROR is not set, multirun sweeps could have silent job failure (see my comment on #2500).

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants