Introduce BestPracticeWarning
to help users with their learning curve
#5276
michaelosthege
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What is this about
Many things are possible with our API.
Some of those are supported.
Some uses of the API are encouraged, others discouraged and about most even the experienced PyMC folk disagree.
One might ask
The answer is a mix of
One example:
Another example:
[1]: We'd like to eventually refactor/remove
MultiTrace
internally. The fewer people use it, the easier that will be.[2]:
InferenceData
objects can be saved/loaded to disk in a consistent format without security implications. That's just better scientific practice.[3]: Plotting and diagnostics with ArviZ use
InferenceData
objects already. Migrate prediction/plotting code toInferenceData
means that data analysis workflows become more reproducible.[4]: Working with
InferenceData
is even more fun and robust when combined withdims
/coords
, which is another encouraged flavor of working with PyMC3.How it can be done
A
BestPracticeWarning
can be added topm.exceptions
and imported at the package level.With
warnings.simplefilter("ignore/once/always/error", BestPracticeWarning)
the warnings can be customized, for example to always raise them in Jupyter notebooks.Beta Was this translation helpful? Give feedback.
All reactions