Pretty print for the model class
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 29
- Forks
- 9
- Avg merge
- 9d 9h
- Merged PRs (30d)
- 8
Description
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 theModelmetaclass. -
_print_details()method for theModelinstances. - Update the tutorials to include the model prints.
- Add a test that check for the required cases (TBD).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named, so start by locating the Model metaclass and its model instance classes, then inspect the tutorials that demonstrated the need for this output. Define the required string sections, instance details, parameter truncation, and MCMC state, update tutorial usage, and add tests covering the listed cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100