Skip to content

Add to_samples and from_samples - #184

Merged
penelopeysm merged 1 commit into
mainfrom
py/tofrom
Nov 5, 2025
Merged

Add to_samples and from_samples#184
penelopeysm merged 1 commit into
mainfrom
py/tofrom

Conversation

@penelopeysm

@penelopeysm penelopeysm commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

See TuringLang/DynamicPPL.jl#1087 (comment), this is the implementation of option (1) from that comment, as discussed in our developer meeting earlier.

I think it makes more sense to use to_samples and from_samples instead of from_chains and to_chains, it reads better.

There are additional bits of AbstractChains interface in #180, but I don't want that to hold this up, because this functionality is semi-urgently needed in DynamicPPL.

Specifically, there is currently no easy way to obtain a Dict of parameters from MCMCChains. Combined with the fact that you can now only reliably initialise parameters using InitFromParams(::Dict), this means that there is no easy way to initialise sampling from one row of MCMCChains.Chains.

@github-actions

github-actions Bot commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

AbstractMCMC.jl documentation for PR #184 is available at:
https://TuringLang.github.io/AbstractMCMC.jl/previews/PR184/

@mhauru mhauru left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree on this being a better name.

@penelopeysm
penelopeysm merged commit 390012e into main Nov 5, 2025
17 of 18 checks passed
@penelopeysm
penelopeysm deleted the py/tofrom branch November 5, 2025 10:42
@codecov

codecov Bot commented Nov 5, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (e58f735) to head (12f8bf0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #184   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants