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

DM-48333: Update UnprocessableDataError to inherit from NoWorkFound #461

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading