ucl-bug / jaxdf

A JAX-based research framework for writing differentiable numerical simulators with arbitrary discretizations
GNU Lesser General Public License v3.0
117 stars 7 forks source link

Throw a better error when `params` is missing from an operator #119

Closed astanziola closed 9 months ago

astanziola commented 1 year ago

Is your feature request related to a problem? Please describe. The current error that is returned to the user when params is potentially not clear:

SignatureError: The argument 'params' must be a keyword argument in . Example: def evaluate(x, *, params)

Describe the solution you'd like Make it clear to the user that params must be defined for operators, and give an example of how that must be done. At the moment, it relies on plums signature error handling

astanziola commented 9 months ago

Fixed in #139