Repository navigation
Nicer output for tp_run() - #31
Merged
Merged
Conversation
…n of all functions involved.
…meter names. Applies to tp_parse_smc() and tp_parse_mcmc().
…ummary at the end of tp_run().
foersterst
force-pushed
the
tidy-output
branch
from
September 23, 2026 16:10
f402742 to
fb40dfe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tp_run()used to return a list built directly from the output JSON viajsonlite. That list was long and hard to read, and it always needed atp_parse…()call afterward to become usable. This PR changes that. Now,tp_run()returns a tidy data frame produced bytp_parse_smc()ortp_parse_mcmc(), called internally for any model those two functions support (models that return trees still need dedicated parsers, which we haven't built yet).tp_run()picks the right parser automatically, based on the inference method and model passed totp_compile(). It reads that information from the sampler and decides which parser to call. For models without a parser yet, it returns the path to the output JSON along with a message instead.The PR also updates the documentation for all functions involved.
TreePPL Release Notes
Added
tp_run()now prints a summary with runtime information and output directories/files.wideintp_parse_smc()andtp_parse_mcmc()to choose between wide (standard in other software) and long (good for plotting) format. Default =TRUE.Changed
tp_run()now returns a tidy data frame (in wide format by default) instead of a list. It automatically callstp_parse_smc()ortp_parse_mcmc(), depending on the inference method and model passed totp_compile(). For models without a parser yet (e.g., models that return trees), it returns the path to the output JSON file along with a message.tp_parse_smc()andtp_parse_mcmc()now take a character vector with the path(s) to the JSON output file(s) instead of the list returned bytp_run().tp_mcmc_convergence()andtp_smc_convergence()now accept data frames in either long or wide format.Deprecated
Removed
Fixed
Security