From 8d283b15b4614e3dfe2378b1c07f7ccf209a9ac5 Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Thu, 16 Jan 2025 08:43:53 -0500 Subject: [PATCH] Guard against spurious int->float conversions in TaskMetadata. --- python/lsst/pipe/base/quantum_provenance_graph.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/lsst/pipe/base/quantum_provenance_graph.py b/python/lsst/pipe/base/quantum_provenance_graph.py index d169fb87..32c1d131 100644 --- a/python/lsst/pipe/base/quantum_provenance_graph.py +++ b/python/lsst/pipe/base/quantum_provenance_graph.py @@ -970,7 +970,10 @@ def __add_new_graph( ): md = butler.get(quantum_run.metadata_ref) try: - quantum_run.caveats = QuantumSuccessCaveats(md["quantum"]["caveats"]) + # Int conversion guards against spurious conversion to + # float that can apparently sometimes happen in + # TaskMetadata. + quantum_run.caveats = QuantumSuccessCaveats(int(md["quantum"]["caveats"])) except LookupError: pass # missing metadata means that the task did not finish.