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)
|
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()
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue