Skip to content

Commit 4552eaf

Browse files
feat(tidy3d): FXC-3829-duplicate-convergence-checks-for-non-lazy-postprocessing
1 parent 7d63ace commit 4552eaf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tidy3d/web/api/container.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
DEFAULT_NUM_WORKERS = 10
4141
DEFAULT_DATA_PATH = "simulation_data.hdf5"
4242
DEFAULT_DATA_DIR = "."
43-
BATCH_MONITOR_PROGRESS_REFRESH_TIME = 0.02
43+
BATCH_PROGRESS_REFRESH_TIME = 0.02
4444

4545
BatchCategoryType = Literal[
4646
"tidy3d",
@@ -839,6 +839,9 @@ def upload(self) -> None:
839839
completed += 1
840840
progress.update(pbar, completed=completed)
841841

842+
progress.refresh()
843+
time.sleep(BATCH_PROGRESS_REFRESH_TIME)
844+
842845
def get_info(self) -> dict[TaskName, TaskInfo]:
843846
"""Get information about each task in the :class:`Batch`.
844847
@@ -1070,7 +1073,7 @@ def pbar_description(
10701073
progress.update(pbar, description=desc, completed=pct)
10711074

10721075
progress.refresh()
1073-
time.sleep(BATCH_MONITOR_PROGRESS_REFRESH_TIME)
1076+
time.sleep(BATCH_PROGRESS_REFRESH_TIME)
10741077

10751078
# final render to terminal state for all bars
10761079
for task_name, job in self.jobs.items():

tidy3d/web/api/tidy3d_stub.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,6 @@ def postprocess(cls, file_path: str, lazy: bool = True) -> WorkflowDataType:
308308
stub_data = Tidy3dStubData.from_file(
309309
file_path, lazy=lazy, on_load=cls._check_convergence_and_warnings
310310
)
311-
if not lazy:
312-
cls._check_convergence_and_warnings(stub_data)
313311
return stub_data
314312

315313
@staticmethod

0 commit comments

Comments
 (0)