Skip to content

Commit

Permalink
Update UnprocessableDataError to inherit from NoWorkFound
Browse files Browse the repository at this point in the history
This is so that the job will not be considered a failure, thus
precluding any inadvertent human time being spent chasing up
the failure.
  • Loading branch information
laurenam committed Jan 8, 2025
1 parent cd2e615 commit de2df11
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions python/lsst/pipe/base/_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,27 @@ def metadata(self) -> NestedMetadataDict | None:
raise NotImplementedError


class UnprocessableDataError(RepeatableQuantumError):
"""Exception that will be subclassed and raised by Tasks to indicate a
failure to process their inputs for some reason that is non-recoverable.
class UnprocessableDataError(NoWorkFound):
"""A specialization of `NoWorkFound` that will be [subclassed and] raised
by Tasks to indicate a failure to process their inputs for some reason that
is non-recoverable.
Notes
-----
An example is a known bright star that causes PSF measurement to fail, and
that makes that detector entirely non-recoverable.
Do not raise this unless we are convinced that the data cannot be
processed, even by a better algorithm. Most instances where this error
would be raised likely require an RFC to explicitly define the situation.
that makes that detector entirely non-recoverable. Another example is an
image with an oddly shaped PSF (e.g. due to a failure to achieve focus)
that warrants the image being flagged as "poor quality" which should not
have further processing attempted.
The `NoWorkFound` inheritance ensures the job will not be considered a
failure (i.e. such that no human time will inadvertently be spent chasing
it down).
Do not raise this unless we are convinced that the data cannot (or should
not) be processed, even by a better algorithm. Most instances where this
error would be raised likely require an RFC to explicitly define the
situation.
"""


Expand Down

0 comments on commit de2df11

Please sign in to comment.