Skip to content

Commit e430572

Browse files
authored
Merge pull request #466 from lsst/tickets/DM-48536
DM-48536: improvements to QuantumProvenanceGraph
2 parents e484a58 + 55dc88d commit e430572

5 files changed

Lines changed: 666 additions & 180 deletions

File tree

doc/changes/DM-48536.feature.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
`QuantumProvenanceGraph` and `pipetask report --force-v2` can now report on exceptions raised and then ignored via the `--no-raise-on-partial-outputs` option.
2+
3+
Exceptions that lead to task failures are not yet tracked, because we do not write task metadata for failures and hence have nowhere to put the information.

python/lsst/pipe/base/_status.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@
3030
import abc
3131
import enum
3232
import logging
33-
from typing import ClassVar, Protocol
33+
from typing import TYPE_CHECKING, ClassVar, Protocol
3434

3535
from lsst.utils import introspection
3636

3737
from ._task_metadata import GetSetDictMetadata, NestedMetadataDict
3838

39+
if TYPE_CHECKING:
40+
from lsst.utils.logging import LsstLogAdapter
41+
3942
__all__ = (
4043
"AlgorithmError",
4144
"AnnotatedPartialOutputsError",
@@ -66,7 +69,7 @@ class QuantumSuccessCaveats(enum.Flag):
6669
ALL_OUTPUTS_MISSING = enum.auto()
6770
"""No predicted outputs (except logs and metadata) were produced.
6871
69-
`ANY_OUTPUTS_MISSING` is also set whenever this flag it set.
72+
`ANY_OUTPUTS_MISSING` is also set whenever this flag is set.
7073
"""
7174

7275
NO_WORK = enum.auto()
@@ -162,11 +165,11 @@ def legend() -> dict[str, str]:
162165
Mapping from character code to description.
163166
"""
164167
return {
165-
"+": "at least one predicted output is missing, but not all",
168+
"+": "at least one predicted output was missing, but not all were",
166169
"*": "all predicated outputs were missing (besides logs and metadata)",
167-
"A": "adjustQuantum raised NoWorkFound; an updated QG would not include this quantum",
170+
"A": "adjustQuantum raised NoWorkFound; a regenerated QG would not include this quantum",
168171
"D": "algorithm considers data too bad to be processable",
169-
"U": "one or more input dataset as incomplete due to an upstream failure",
172+
"U": "one or more input dataset was incomplete due to an upstream failure",
170173
"P": "task failed but wrote partial outputs; considered a partial success",
171174
"N": "runQuantum raised NoWorkFound",
172175
}
@@ -177,7 +180,9 @@ class GetSetDictMetadataHolder(Protocol):
177180
`GetSetDictMetadata`.
178181
"""
179182

180-
metadata: GetSetDictMetadata | None
183+
@property
184+
def metadata(self) -> GetSetDictMetadata | None:
185+
pass
181186

182187

183188
class NoWorkFound(BaseException):
@@ -297,7 +302,7 @@ class AnnotatedPartialOutputsError(RepeatableQuantumError):
297302

298303
@classmethod
299304
def annotate(
300-
cls, error: Exception, *args: GetSetDictMetadataHolder | None, log: logging.Logger
305+
cls, error: Exception, *args: GetSetDictMetadataHolder | None, log: logging.Logger | LsstLogAdapter
301306
) -> AnnotatedPartialOutputsError:
302307
"""Set metadata on outputs to explain the nature of the failure.
303308

0 commit comments

Comments
 (0)