rlouf / mcx

Express & compile probabilistic programs for performant inference on CPU & GPU. Powered by JAX.
https://rlouf.github.io/mcx
Apache License 2.0
324 stars 17 forks source link

Separate error messages from code in core #5

Closed rlouf closed 3 years ago

rlouf commented 4 years ago

Many potential and actual errors can be detected when parsing the model definition and doing static checks. We need to raise informative error messages with suggestions on how to correct the mistake.

Long-ish messages, however, can get in the way of the code. I suggest to define error messages in tuples, which can then be used where appropriate. This should make the code more readable, and also allow developers to write error messages as long as they need to be.

rlouf commented 3 years ago

Being addressed in #53