Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty print for the model class #97

Open
4 tasks
gvegayon opened this issue May 3, 2024 · 0 comments
Open
4 tasks

Pretty print for the model class #97

gvegayon opened this issue May 3, 2024 · 0 comments

Comments

@gvegayon
Copy link
Member

gvegayon commented May 3, 2024

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

  • It should have the __str__() method (see this).
  • It should print something like the following:
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).
@damonbayer damonbayer added this to the Backlog milestone May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants