Conversation
kudlicka
commented
Mar 26, 2026
- Introduce classes for compile and run arguments.
- Make compile arguments mirror tpplc arguments.
- Support saving and loading run arguments.
- Enable saving inference results to a file.
- Remove obsolete syntax highlighting in Jupyter notebooks.
- Refactor code for better PEP 8 compliance.
- Introduce classes for compile and run arguments. - Make compile arguments mirror tpplc arguments. - Support saving and loading run arguments. - Enable saving inference results to a file. - Remove obsolete syntax highlighting in Jupyter notebooks. - Refactor code for better PEP 8 compliance.
Exampleswith treeppl.Model(filename="coin.tppl", m="smc-bpf", particles=100000) as coin:
res = coin(outcomes=[True, True, False, True, False])The The with treeppl.Model(filename="coin.tppl", m="smc-bpf", particles=100000) as coin:
res = coin.run(outcomes=[True, True, False, True, False])Saving the arguments of the last run of the model: with treeppl.Model(filename="coin.tppl", m="smc-bpf", particles=100000) as coin:
res = coin(outcomes=[True, True, False, True, False])
coin.run_arguments.save_json("input.json")Note: One potential improvement to discuss is moving the Loading arguments from a JSON file: with treeppl.Model(filename="coin.tppl", m="smc-bpf", particles=100000) as coin:
res = coin(arguments=treeppl.RunArguments.from_json("input.json")) |
|
This passes tests and can be merged. Since it makes user-facing changes, could you summarize them briefly and put that in a PR to the changelog under the "unreleased" heading on the webpage (https://github.com/treeppl/treeppl.github.io/blob/master/docs/changelog.md) and then ping me? |