Skip to content

Commit

Permalink
add solver_version for metadata api
Browse files Browse the repository at this point in the history
  • Loading branch information
wei authored and momchil-flex committed Dec 21, 2024
1 parent 005c812 commit 3bd312e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions tidy3d/web/api/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class Job(WebContainer):
"verbose",
"simulation_type",
"parent_tasks",
"solver_version",
)

def to_file(self, fname: str) -> None:
Expand Down
7 changes: 5 additions & 2 deletions tidy3d/web/api/webapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def run(
progress_callback=progress_callback_upload,
simulation_type=simulation_type,
parent_tasks=parent_tasks,
solver_version=solver_version,
)
start(
task_id,
Expand All @@ -174,6 +175,7 @@ def upload(
simulation_type: str = "tidy3d",
parent_tasks: List[str] = None,
source_required: bool = True,
solver_version: str = None,
) -> TaskId:
"""
Upload simulation to server, but do not start running :class:`.Simulation`.
Expand All @@ -199,7 +201,8 @@ def upload(
List of related task ids.
source_required: bool = True
If ``True``, simulations without sources will raise an error before being uploaded.
solver_version: str = None
target solver version.
Returns
-------
str
Expand Down Expand Up @@ -252,7 +255,7 @@ def upload(
progress_callback=progress_callback,
remote_sim_file=remote_sim_file,
)
estimate_cost(task_id=task.task_id, verbose=verbose)
estimate_cost(task_id=task.task_id, solver_version=solver_version, verbose=verbose)

# log the url for the task in the web UI
log.debug(f"{Env.current.website_endpoint}/folders/{task.folder_id}/tasks/{task.task_id}")
Expand Down

0 comments on commit 3bd312e

Please sign in to comment.