Skip to content

Commit df6c375

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

File tree

11 files changed

+1357
-104
lines changed

11 files changed

+1357
-104
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
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`.
2828
- Added support of `os.PathLike` objects as paths like `pathlib.Path` alongside `str` paths in all path-related functions.
29+
- Added configurable local simulation result caching with checksum validation, eviction limits, and per-call overrides across `web.run`, `web.load`, and job workflows.
2930

3031
### Changed
3132
- 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.local_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)