From 211ba4599a42e5cde2d61439d24de93d1681e787 Mon Sep 17 00:00:00 2001 From: momchil Date: Wed, 28 Dec 2022 15:24:48 -0800 Subject: [PATCH] Showing billed FlexUnit at the end of web.monitor --- tidy3d/web/webapi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tidy3d/web/webapi.py b/tidy3d/web/webapi.py index 23ac6ca5f..e795455a2 100644 --- a/tidy3d/web/webapi.py +++ b/tidy3d/web/webapi.py @@ -248,7 +248,7 @@ def get_status(show_cost=False): # log the maximum flex unit cost est_flex_unit = task_info.estFlexUnit if show_cost is True and est_flex_unit is not None and est_flex_unit > 0: - log.info(f"Maximum flex unit cost: {est_flex_unit:1.2f}") + log.info(f"Maximum FlexUnit cost: {est_flex_unit:1.3f}") # Set show_cost to False so that it is only shown once during the run show_cost = False @@ -305,6 +305,9 @@ def get_status(show_cost=False): log.info(f"status = {status}") time.sleep(REFRESH_TIME) + # show final billed cost + log.info(f"Billed FlexUnit cost: {get_info(task_id).realFlexUnit:1.3f}") + def download(task_id: TaskId, path: str = "simulation_data.hdf5") -> None: """Download results of task and log to file.