Skip to content

Tests and CI, and the decision on the overlap with the library's symbolic PDE module - #4

Merged
barrosyan merged 1 commit into
mainfrom
test/decide-and-add-ci
Nov 19, 2026
Merged

barrosyan merged 1 commit into
mainfrom
test/decide-and-add-ci

Conversation

@barrosyan

Copy link
Copy Markdown
Collaborator

Closes #3.

Tests — five, over the generator rather than the examples:

  • a factory builds a loss from real SymPy strings and reports its components;
  • the loss is differentiable with respect to the network, and not vacuously (a non-zero gradient has to appear);
  • the data term is the mean squared error, checked against a hand computation rather than against whatever the code returns;
  • an inverse parameter is registered and receives a gradient — an inverse problem is only solvable if the unknown is something the loss touches;
  • a loss weight scales only its own term.

Verified locally: 5 passed in 2.1 s.

CI — Python 3.10, 3.11 and 3.12 on ubuntu-latest, CPU torch, sympy, pytest.

The decision — this stays a small independent package, not a wrapper. The overlap with pinneapple_physics.symbolic_pde is real and is written down, but: this installs with torch and sympy alone while the library is a git dependency of several hundred megabytes; 0.1.0 is published on PyPI with this API; and two implementations, one small enough to read in one sitting, are easier to check against each other than one with no second opinion.

The README names the cost of that choice — a fix in one will not reach the other — and says that if it ever becomes the reason to merge, the merge should be into the library, not into a wrapper that hides the dependency.

…DE module

Five tests over the generator: a factory builds a loss from real SymPy
strings, the loss is differentiable with respect to the network, the data
term is the mean squared error checked by hand, an inverse parameter
receives a gradient, and a loss weight scales only its own term.

Records the decision the issue asked for: this stays an independent
package rather than a wrapper, because it installs with torch and sympy
alone, its API is published on PyPI, and the duplication is named as the
cost it is.
@barrosyan
barrosyan merged commit fc646f4 into main Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide the relation to SymbolicPDE in the core and add CI with tests

1 participant