Skip to content

Commit 44a7e25

Browse files
committed
add solver_version parameter to run_async and fix associated bug in component modelers
1 parent 6582824 commit 44a7e25

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3636
- Revert overly restrictive validation of `freqs` in the `ComponentModeler` and `TerminalComponentModeler`.
3737
- Fixed `ElectromagneticFieldData.to_zbf()` to support single frequency monitors and apply the correct flattening order.
3838
- Bug in `TerminalComponentModeler.get_antenna_metrics_data` when port amplitudes are set to zero.
39+
- Added missing `solver_version` keyword argument to `run_async`.
3940

4041
## [2.9.0] - 2025-08-04
4142

tidy3d/plugins/smatrix/component_modelers/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ def batch_data(self) -> BatchData:
273273
"type",
274274
"path_dir",
275275
"attrs",
276-
"solver_version",
277276
"jobs_cached",
278277
"num_workers",
279278
"simulations",

tidy3d/web/api/asynchronous.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def run_async(
1919
num_workers: Optional[int] = None,
2020
verbose: bool = True,
2121
simulation_type: str = "tidy3d",
22+
solver_version: Optional[str] = None,
2223
parent_tasks: Optional[dict[str, list[str]]] = None,
2324
reduce_simulation: Literal["auto", True, False] = "auto",
2425
pay_type: Union[PayType, str] = PayType.AUTO,
@@ -43,6 +44,10 @@ def run_async(
4344
Number of tasks to submit at once in a batch, if None, will run all at the same time.
4445
verbose : bool = True
4546
If ``True``, will print progressbars and status, otherwise, will run silently.
47+
simulation_type : str = "tidy3d"
48+
Type of simulation being uploaded.
49+
solver_version: Optional[str] = None
50+
Target solver version.
4651
reduce_simulation: Literal["auto", True, False] = "auto"
4752
Whether to reduce structures in the simulation to the simulation domain only. Note: currently only implemented for the mode solver.
4853
pay_type: Union[PayType, str] = PayType.AUTO
@@ -79,6 +84,7 @@ def run_async(
7984
callback_url=callback_url,
8085
verbose=verbose,
8186
simulation_type=simulation_type,
87+
solver_version=solver_version,
8288
parent_tasks=parent_tasks,
8389
reduce_simulation=reduce_simulation,
8490
pay_type=pay_type,

tidy3d/web/api/autograd/autograd.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ def run_async(
247247
num_workers: typing.Optional[int] = None,
248248
verbose: bool = True,
249249
simulation_type: str = "tidy3d",
250+
solver_version: typing.Optional[str] = None,
250251
parent_tasks: typing.Optional[dict[str, list[str]]] = None,
251252
local_gradient: bool = LOCAL_GRADIENT,
252253
max_num_adjoint_per_fwd: int = MAX_NUM_ADJOINT_PER_FWD,
@@ -273,6 +274,10 @@ def run_async(
273274
Number of tasks to submit at once in a batch, if None, will run all at the same time.
274275
verbose : bool = True
275276
If ``True``, will print progressbars and status, otherwise, will run silently.
277+
simulation_type : str = "tidy3d"
278+
Type of simulation being uploaded.
279+
solver_version: Optional[str] = None
280+
Target solver version.
276281
local_gradient: bool = False
277282
Whether to perform gradient calculations locally, requiring more downloads but potentially
278283
more stable with experimental features.
@@ -307,6 +312,7 @@ def run_async(
307312
num_workers=num_workers,
308313
verbose=verbose,
309314
simulation_type="tidy3d_autograd_async",
315+
solver_version=solver_version,
310316
parent_tasks=parent_tasks,
311317
local_gradient=local_gradient,
312318
max_num_adjoint_per_fwd=max_num_adjoint_per_fwd,
@@ -321,6 +327,7 @@ def run_async(
321327
num_workers=num_workers,
322328
verbose=verbose,
323329
simulation_type=simulation_type,
330+
solver_version=solver_version,
324331
parent_tasks=parent_tasks,
325332
reduce_simulation=reduce_simulation,
326333
pay_type=pay_type,

0 commit comments

Comments
 (0)