Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve callbacks #152

Open
2 tasks
torfjelde opened this issue Dec 5, 2024 · 2 comments
Open
2 tasks

Improve callbacks #152

torfjelde opened this issue Dec 5, 2024 · 2 comments

Comments

@torfjelde
Copy link
Member

Callbacks can be incredibly useful, e.g. TuringCallbacks.jl with TensorBoardLogging.jl integration.

However, there are many "standard" callbacks that we arguably should provide some default implementation (i.e. that have "zero" dependencies) of:

  • StateHistoryCallback: simply extracts the states from a sample call. This is useful if one wants to inspect sampler parameters, etc. that aren't necessarily part of the transitions. Ref: sample equivalent but including states #84
  • : MultipleCallback: a wrapper around multiple callbacks to make it easier to pass many of them. Ref: Allow multiple callbacks #80
  • ???

The question is then: should these go in AbstractMCMC.jl itself, or should we put them in a separate package?

And if we're putting them in a separate package (which I also think is the best approach here), then do we put them in a package called AbstractMCMCCallbacks.jl or in the existing TuringCallbacks.jl?

Thoughts? @devmotion @yebai @sunxd3 @mhauru @penelopeysm

@devmotion
Copy link
Member

Could the TensorBoardCallback moved to an extension? Then TuringCallbacks would seem rather lightweight and adding more callbacks there would seem the most straightforward approach.

MultipleCallback

TuringCallbacks already contains MultiCallback, isn't that the same thing?

@torfjelde
Copy link
Member Author

Could the TensorBoardCallback moved to an extension? Then TuringCallbacks would seem rather lightweight and adding more callbacks there would seem the most straightforward approach.

Yeah, could potentially do that. Though it's original intention was to be "batteries included". But yeah, maybe it makes more sense to just put it in an extension for now.

TuringCallbacks already contains MultiCallback, isn't that the same thing?

Yep yep, so it's more that TuringCallbacks.jl is somewhat of a heavy dep.

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

No branches or pull requests

2 participants