1
0
Fork 0

estimate steps better, pass progress onto reply

This commit is contained in:
Sean Sube 2024-01-04 19:48:43 -06:00
parent 4dc251cf4a
commit 10acad232c
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 9 additions and 5 deletions

View File

@ -140,8 +140,12 @@ class ChainPipeline:
callback = ChainProgress.from_progress(callback) callback = ChainProgress.from_progress(callback)
# set estimated totals # set estimated totals
# TODO: should use self.steps, but size is not available here steps = params.steps
callback.set_total(params.steps, stages=len(self.stages), tiles=0) if "size" in pipeline_kwargs and isinstance(pipeline_kwargs["size"], Size):
size = pipeline_kwargs["size"]
steps = self.steps(params, size)
callback.set_total(steps, stages=len(self.stages), tiles=0)
start = monotonic() start = monotonic()

View File

@ -685,9 +685,9 @@ def job_status(server: ServerContext, pool: DevicePoolExecutor):
server, server,
job_name, job_name,
status, status,
stages=Progress(progress.stages, 0), stages=progress.stages,
steps=Progress(progress.steps, 0), steps=progress.steps,
tiles=Progress(progress.tiles, 0), tiles=progress.tiles,
outputs=outputs, outputs=outputs,
metadata=metadata, metadata=metadata,
) )