Skip to content

Commit 86586e0

Browse files
feat(tidy3d): FXC-3294-add-opt-in-local-cache-for-simulation-results
1 parent dc01be1 commit 86586e0

File tree

11 files changed

+1394
-102
lines changed

11 files changed

+1394
-102
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
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.
2727
- Introduced a profile-based configuration manager with TOML persistence and runtime overrides exposed via `tidy3d.config`.
28+
- Added configurable local simulation result caching with checksum validation, eviction limits, and per-call overrides across `web.run`, `web.load`, and job workflows.
2829

2930
### Changed
3031
- 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
@@ -661,7 +661,7 @@ def plot_sim(sim: td.Simulation, plot_eps: bool = True) -> None:
661661
# args = [("polyslab", "mode")]
662662

663663

664-
def get_functions(structure_key: str, monitor_key: str) -> typing.Callable:
664+
def get_functions(structure_key: str, monitor_key: str) -> dict[str, typing.Callable]:
665665
if structure_key == ALL_KEY:
666666
structure_keys = structure_keys_
667667
else:

0 commit comments

Comments
 (0)