Skip to content

Make FlexiChains the default chain type#2743

Merged
penelopeysm merged 22 commits into
mainfrom
py/fc
May 2, 2026
Merged

Make FlexiChains the default chain type#2743
penelopeysm merged 22 commits into
mainfrom
py/fc

Conversation

@penelopeysm
Copy link
Copy Markdown
Member

@penelopeysm penelopeysm commented Jan 2, 2026

Mostly interested in seeing what breaks, I ran some tests offline then got bored.

As far as source code changes go, I only needed to change the definition of DEFAULT_CHAIN_TYPE and twiddle with some imports. So in principle this is pretty much done.

Most changes were really in the test suite, using chn[@varname(x)] instead of chn[:x]. In fact, that isn't even necessary, but I just consider it good practice.

The only changes that I found to be mandatory were changing things like chn[Symbol("m[1]")] to chn[@varname(m[1])], which is a Positive Change, and also other things that relied too heavily on the exact internal structure of MCMCChains, which is also a Positive Change, or a Neutral Change in the cases where I had to rely on the internal structure of FlexiChains.

This PR should definitely target breaking, but that would cause version conflicts with FlexiChains, since FlexiChains has a compat entry that pins Turing to its current minor version. That can be fixed by moving FlexiChainsTuringExt into Turing proper, so that that compat entry can be removed.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 2, 2026

Turing.jl documentation for PR #2743 is available at:
https://TuringLang.github.io/Turing.jl/previews/PR2743/

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 16.66667% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.61%. Comparing base (6df73f8) to head (7787790).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ext/TuringMCMCChainsExt.jl 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2743      +/-   ##
==========================================
- Coverage   85.40%   84.61%   -0.80%     
==========================================
  Files          22       23       +1     
  Lines        1501     1514      +13     
==========================================
- Hits         1282     1281       -1     
- Misses        219      233      +14     

☔ 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.

@penelopeysm penelopeysm force-pushed the py/fc branch 2 times, most recently from c09ba13 to 76c1ccb Compare January 2, 2026 22:51
@penelopeysm penelopeysm marked this pull request as ready for review March 13, 2026 11:19
Copy link
Copy Markdown
Member

@sunxd3 sunxd3 left a comment

Choose a reason for hiding this comment

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

LG! (it is breaking indeed)

@penelopeysm
Copy link
Copy Markdown
Member Author

Thanks @sunxd3! Yeah, it is actually even more work than this. I need to transfer the extensions into Turing/DynamicPPL as well. That should hopefully just be a copypaste but I'm sure it will break something...

Comment thread Project.toml Outdated
@penelopeysm
Copy link
Copy Markdown
Member Author

penelopeysm commented May 1, 2026

I probably won't have the time to finish this up.

(well, it seems it depends on whether I want to work on the weekend lol.)

Sequence of events:

@penelopeysm penelopeysm changed the title Make FlexiChains the default chain type (?) Make FlexiChains the default chain type May 2, 2026
@penelopeysm penelopeysm merged commit 18eedab into main May 2, 2026
26 of 30 checks passed
@penelopeysm penelopeysm deleted the py/fc branch May 2, 2026 19:57
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