Skip to content

Commit

Permalink
fix(api): report chain progress using a new callback if none was prov…
Browse files Browse the repository at this point in the history
…ided
  • Loading branch information
ssube committed Sep 12, 2023
1 parent 55ddb9f commit f9acf9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/onnx_web/chain/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ def __call__(
"""
DEPRECATED: use `run` instead
"""
if callback is not None:
if callback is None:
callback = worker.get_progress_callback()
else:
callback = ChainProgress.from_progress(callback)

start = monotonic()
Expand Down

0 comments on commit f9acf9b

Please sign in to comment.