Skip to content

Commit 99a21b6

Browse files
feat(tidy3d): FXC-3294-add-opt-in-local-cache-for-simulation-results
1 parent 7d63ace commit 99a21b6

File tree

13 files changed

+1602
-100
lines changed

13 files changed

+1602
-100
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424
- `sort_spec` in `ModeSpec` allows for fine-grained filtering and sorting of modes. This also deprecates `filter_pol`. The equivalent usage for example to `filter_pol="te"` is `sort_spec=ModeSortSpec(filter_key="TE_polarization", filter_reference=0.5)`. `ModeSpec.track_freq` has also been deprecated and moved to `ModeSortSpec.track_freq`.
2525
- Added `custom_source_time` parameter to `ComponentModeler` classes (`ModalComponentModeler` and `TerminalComponentModeler`), allowing specification of custom source time dependence.
2626
- Validation for `run_only` field in component modelers to catch duplicate or invalid matrix indices early with clear error messages.
27+
- Added configurable local simulation result caching with checksum validation, eviction limits, and per-call overrides across `web.run`, `web.load`, and job workflows.
2728

2829
### Changed
2930
- Improved performance of antenna metrics calculation by utilizing cached wave amplitude calculations instead of recomputing wave amplitudes for each port excitation in the `TerminalComponentModelerData`.

docs/index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@ This will produce the following plot, which visualizes the electromagnetic field
168168

169169
You can now postprocess simulation data using the same python session, or view the results of this simulation on our web-based `graphical user interface (GUI) <https://tidy3d.simulation.cloud>`_.
170170

171+
.. tip::
172+
173+
Repeated runs of the same simulation can reuse solver results by enabling the optional
174+
local cache: ``td.config.simulation_cache.enabled = True``. The cache location and limits are
175+
configurable (see ``~/.tidy3d/config``), entries are checksum-validated, and you can clear
176+
all stored artifacts with ``tidy3d.web.cache.clear()``.
177+
171178
.. `TODO: open example in colab <https://github.com/flexcompute/tidy3d>`_
172179
173180
@@ -262,4 +269,3 @@ Contents
262269

263270

264271

265-

tests/test_components/autograd/test_autograd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ def plot_sim(sim: td.Simulation, plot_eps: bool = True) -> None:
665665
# args = [("polyslab", "mode")]
666666

667667

668-
def get_functions(structure_key: str, monitor_key: str) -> typing.Callable:
668+
def get_functions(structure_key: str, monitor_key: str) -> dict[str, typing.Callable]:
669669
if structure_key == ALL_KEY:
670670
structure_keys = structure_keys_
671671
else:

0 commit comments

Comments
 (0)