CDCgov / PyRenew

Python package for multi-signal Bayesian renewal modeling with JAX and NumPyro.
https://cdcgov.github.io/PyRenew/
Apache License 2.0
14 stars 2 forks source link

Make `validation()` methods optional and class specific #288

Open dylanhmorris opened 3 months ago

dylanhmorris commented 3 months ago

Right now, validate() is a mandatory method for subclasses of RandomVariable, but many actual random variables do not have meaningful validation implemented.

We should decide whether most/all can and should have to have meaningful validation. If so, we should implement. If not, perhaps the base class method be a concrete pass that gets overridden / extended by subclass validation methods.

See https://github.com/CDCgov/multisignal-epi-inference/pull/275#discussion_r1684984625_

dylanhmorris commented 1 month ago

We should make a decision on this and move forward. Leaning toward removing validate as a mandatory method, and letting individual RVs define validation or not as appropriate. @damonbayer @sbidari thoughts?

damonbayer commented 1 month ago

Agree with making this optional.

sbidari commented 1 month ago

Agree!