Skip to content

Improve Callbacks - #191

Merged
yebai merged 14 commits into
mainfrom
callbacks-updates
Jan 26, 2026
Merged

Improve Callbacks#191
yebai merged 14 commits into
mainfrom
callbacks-updates

Conversation

@shravanngoswamii

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

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

Comment thread ext/AbstractMCMCOnlineStatsExt.jl Outdated
@shravanngoswamii shravanngoswamii changed the title fix Callbacks errors Improve Callbacks Jan 23, 2026

@yebai yebai 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.

Looks very good, @shravanngoswamii. One last refactoring comment!

Comment thread src/callbacks.jl Outdated
Comment thread src/callbacks.jl Outdated
Comment thread src/callbacks.jl Outdated
Comment thread src/callbacks.jl
Comment thread docs/src/callbacks.md Outdated
Comment thread src/callbacks.jl Outdated
Comment thread ext/AbstractMCMCOnlineStatsExt.jl Outdated
Comment thread Project.toml Outdated
Comment thread docs/src/callbacks.md Outdated
Comment thread ext/AbstractMCMCOnlineStatsExt.jl Outdated
Comment thread src/callbacks.jl Outdated
Comment thread src/callbacks.jl Outdated
@penelopeysm

penelopeysm commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

Can I request that you merge this into a branch that is not main?

On the Turing.jl PR can you use https://pkgdocs.julialang.org/v1/toml-files/#The-%5Bsources%5D-section to point to the unreleased branch of AbstractMCMC?

I want to avoid a situation where we do stuff on Turing, realise that something here needs to be changed, and then you have to make a breaking release on AbstractMCMC to fix it.

Once the Turing code is fine then we can release a new minor version here.

@shravanngoswamii

Copy link
Copy Markdown
Member Author

I would go further and ask why there are extras and stats separately? There's a filter that allows the user to control which stats they want, right? Can't the sampler bundle literally everything into stats, and then the user can be responsible for choosing which ones they want?

We kept them separate based on @yebai's suggestion to distinguish between step-level statistics and "extras" (hyperparameters).

@yebai yebai 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.

Excellent work, thanks @shravanngoswamii!

Comment thread src/callbacks.jl Outdated
Comment thread src/callbacks.jl Outdated

@penelopeysm penelopeysm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! Final comment: please push a new branch to the repo that has the same state as main, maybe call it callbacks or something, and change the base branch of this PR to be that. Then I'm happy to merge.

@yebai

yebai commented Jan 26, 2026

Copy link
Copy Markdown
Member

@penelopeysm, since this PR isn't breaking and other research work depends on it, are you happy if we merge it to main and release it immediately?

@penelopeysm

Copy link
Copy Markdown
Contributor

No not really, because I would rather not find out that there's something that needs to be changed in the interface, and then having to release a breaking version of AbstractMCMC.

other research work depends on it

Am I missing something, or is it just the Turing PR?

If it's just the Turing PR, as I said in my last comment somewhere up there, you can use [sources] in Project.toml to point to an unreleased branch.

This is what Markus and I have been doing for DPPL releases for quite a while now.

@penelopeysm

Copy link
Copy Markdown
Contributor

(If you're like, absolutely, 100%, certain that the interface is final and it will not need to be changed, then sure merge to main and release -- but I don't have that confidence myself.)

@yebai

yebai commented Jan 26, 2026

Copy link
Copy Markdown
Member

It's very helpful for some MCMC research work : )

Let's be slightly more flexible here, since AbstractMCMC.ParamsWithStats is likely to be overloaded only by Tuing.jl and JuliaBUGS.jl in the near future, and @shravanngoswamii can help keep them in sync.

@yebai
yebai merged commit d53ed3d into main Jan 26, 2026
15 checks passed
@yebai
yebai deleted the callbacks-updates branch January 26, 2026 12:56
@codecov

codecov Bot commented Jan 26, 2026

Copy link
Copy Markdown

Codecov Report

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

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

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

@shravanngoswamii

Copy link
Copy Markdown
Member Author

@shravanngoswamii can help keep them in sync.

Happy to iterate on it anytime!

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.

3 participants