Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-32504

SingleQuantumExecutor should log exception messages

    XMLWordPrintable

    Details

    • 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

       

        Attachments

          Activity

          Hide
          ctslater Colin Slater added a comment -

          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.

          Show
          ctslater Colin Slater added a comment - 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 .
          Hide
          hchiang2 Hsin-Fang Chiang added a comment -

          LGTM and it's useful to have those in the log datasets

          Show
          hchiang2 Hsin-Fang Chiang added a comment - LGTM and it's useful to have those in the log datasets

            People

            Assignee:
            ctslater Colin Slater
            Reporter:
            ctslater Colin Slater
            Reviewers:
            Hsin-Fang Chiang
            Watchers:
            Colin Slater, Hsin-Fang Chiang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.