Skip to content

Commit

Permalink
fix: thresh bug when there is RedisRegistryError (#164)
Browse files Browse the repository at this point in the history
Signed-off-by: kbatra <[email protected]>
  • Loading branch information
s0nicboOm authored Jul 31, 2023
1 parent 1eafb0d commit 5653128
Show file tree
Hide file tree
Showing 3 changed files with 267 additions and 202 deletions.
5 changes: 4 additions & 1 deletion numaprom/udf/threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def threshold(_: list[str], datum: Datum) -> list[tuple[str, bytes]]:
)
payload.set_header(Header.STATIC_INFERENCE)
payload.set_status(Status.RUNTIME_ERROR)
return orjson.dumps(payload, option=orjson.OPT_SERIALIZE_NUMPY)
return [
(TRAIN_VTX_KEY, orjson.dumps(train_payload)),
(POSTPROC_VTX_KEY, _get_static_thresh_payload(payload, metric_config)),
]
except Exception as ex:
LOGGER.exception(
"{uuid} - Unhandled exception while fetching threshold artifact, "
Expand Down
Loading

0 comments on commit 5653128

Please sign in to comment.