Skip to content

Commit

Permalink
Showing billed FlexUnit at the end of web.monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
momchil-flex committed Dec 28, 2022
1 parent a7de987 commit 211ba45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tidy3d/web/webapi.py
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 211ba45

Please sign in to comment.