estimate steps better, pass progress onto reply
This commit is contained in:
parent
4dc251cf4a
commit
10acad232c
|
@ -140,8 +140,12 @@ class ChainPipeline:
|
|||
callback = ChainProgress.from_progress(callback)
|
||||
|
||||
# set estimated totals
|
||||
# TODO: should use self.steps, but size is not available here
|
||||
callback.set_total(params.steps, stages=len(self.stages), tiles=0)
|
||||
steps = params.steps
|
||||
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()
|
||||
|
||||
|
|
|
@ -685,9 +685,9 @@ def job_status(server: ServerContext, pool: DevicePoolExecutor):
|
|||
server,
|
||||
job_name,
|
||||
status,
|
||||
stages=Progress(progress.stages, 0),
|
||||
steps=Progress(progress.steps, 0),
|
||||
tiles=Progress(progress.tiles, 0),
|
||||
stages=progress.stages,
|
||||
steps=progress.steps,
|
||||
tiles=progress.tiles,
|
||||
outputs=outputs,
|
||||
metadata=metadata,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue