Commit b4e8766
committed
deepxde: defer import-time backend banner
`import deepxde` prints a multi-line backend banner ("Using backend:
pytorch ...") on first load. The eager `from .deepxde_integration
import DeepXDEAdapter` in `epde/integrate/__init__.py` and the
top-level import in `fitness.py` meant any `import epde` triggered
that banner even when no DeepXDE solver is in use (e.g. the legacy
L2 / L2LR fitness paths).
Drop the eager imports; expose `DeepXDEAdapter` via a PEP 562
`__getattr__` on `epde.integrate` so the name still resolves on first
access, but the banner only fires when DeepXDE is actually requested
(via `DeepXDEBasedFitness.apply()`'s existing lazy import at line
436).1 parent 777d6db commit b4e8766
2 files changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
0 commit comments