We need to have a nice printout of the model class. Users should be able to quickly inspect what the model is without having to list all members of the model class.
Context
During the development of the tutorials, it became apparent the need for this feature.
pyrenew.[Model instance]
Number of parameters: [a number goes here]
State of the MCMC: [run/not run]
Model components:
- [Latent process 1]
- [Latent process 2]
- [...]
First (k) parameters: param1, param2, ..., (omitting [N - k]).
Model components can be sort of an instance-dependent print implemented in a hidden function, e.g., _print_details().
Specifications
[ ] __str__() method for the Model metaclass.
[ ] _print_details() method for the Model instances.
[ ] Update the tutorials to include the model prints.
[ ] Add a test that check for the required cases (TBD).
Goal
We need to have a nice printout of the model class. Users should be able to quickly inspect what the model is without having to list all members of the model class.
Context
During the development of the tutorials, it became apparent the need for this feature.
Required features
__str__()
method (see this).Model components can be sort of an instance-dependent print implemented in a hidden function, e.g.,
_print_details()
.Specifications
__str__()
method for theModel
metaclass._print_details()
method for theModel
instances.