File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1
1
"""Imports for adjoint plugin."""
2
+ # ruff: noqa: E402
2
3
3
4
# import the jax version of tidy3d components
4
5
from __future__ import annotations
5
6
7
+ from textwrap import dedent
8
+
9
+ from tidy3d .log import log
10
+
11
+ _DOC_URL = "https://github.com/flexcompute/tidy3d/blob/develop/tidy3d/plugins/autograd/README.md"
12
+
13
+ _MSG = dedent (
14
+ f"""
15
+ The 'adjoint' plugin (legacy JAX-based adjoint plugin) was deprecated in Tidy3D '2.7.0' and will be disabled as of '2.9.0'.
16
+
17
+ ➤ Migrate to the native autograd workflow:
18
+ import tidy3d as td
19
+ import autograd.numpy as np
20
+ from autograd import grad
21
+
22
+ It uses standard 'td.' objects, has fewer dependencies, and offers a smoother optimization experience.
23
+ Full guide ↗ { _DOC_URL }
24
+ """
25
+ ).strip ()
26
+
27
+ log .warning (_MSG )
28
+
6
29
try :
7
30
import jax
8
31
You can’t perform that action at this time.
0 commit comments