Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ctrl_mpexec
-
Team:DM Science
-
Urgent?:No
Description
When tasks exit by throwing an exception, SingleQuantumExecutor logs that an exception has occurred, but details about what exception occurred are only stored in exc_info and aren't readily available when printing the task logs stored in the butler.
It would be more useful for the log message reporting the task failure to include the exception name and the exception message (i.e. "TaskError: blah" when encountering raise TaskError("blah")). The traceback does not need to be included and is better left in exc_info.
The relevant line is https://github.com/lsst/ctrl_mpexec/blob/ce390c4c4527c46b65416f0cf66071b8e73a3f89/python/lsst/ctrl/mpexec/singleQuantumExecutor.py#L176
Hsin-Fang Chiang, would you like to review this error message change, since you're the most likely other person to be looking for this type of message?
Two relevant examples of the new message, as seen in the butler log datasets, are:
ERROR 2021-11-09T02:32:51.484450+00:00 ctrl.mpexec.singleQuantumExecutor singleQuantumExecutor.py:176 - Execution of task 'calibrate' on quantum {instrument: 'LSSTCam-imSim', detector: 114, visit: 250396, ...} failed. Exception TaskError: Fit failed: median scatter on sky = 11.317 arcsec > 10.000 config.maxScatterArcsec
and
ERROR 2021-11-09T02:29:43.369555+00:00 ctrl.mpexec.singleQuantumExecutor singleQuantumExecutor.py:176 - Execution of task 'characterizeImage' on quantum {instrument: 'LSSTCam-imSim', detector: 40, visit: 699456, ...} failed. Exception RuntimeError: Unable to measure aperture correction for required algorithm 'modelfit_CModel': only 0 sources, but require at least 2.
FWIW, when I ran this with pipetask, the whole traceback was printed twice. In the butler dataset the traceback is available in exc_info.