Skip to content

Enable integration with fixed, non-uniform schedule. #404

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

Merged
merged 2 commits into from
Apr 12, 2025

Conversation

vpratz
Copy link
Collaborator

@vpratz vpratz commented Apr 11, 2025

This PR enables specialized, manually specified schedules, as for example required in diffusion models for inference.

Regarding the changes in integrate: I changed the match-case to an if-else structure, as I was not able to express it properly otherwise, as custom types like Tensor seem not to be easily compatible with match statements. If you want to keep the match statement and know how to do it, feel free to change it.

I'm also not sure whether we want to allow Sequence in general (lists, tuples, ...), or only numpy arrays and tensors.
If you have any thoughts, please let me know.

Closes #402.

This enables specialized, manually specified schedules, as for example
required in diffusion models for inference.

Closes bayesflow-org#402.
@vpratz vpratz requested a review from LarsKue April 11, 2025 17:16
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 64.51613% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
bayesflow/utils/integrate.py 64.51% 11 Missing ⚠️
Files with missing lines Coverage Δ
bayesflow/utils/integrate.py 52.77% <64.51%> (+2.36%) ⬆️

@LarsKue
Copy link
Contributor

LarsKue commented Apr 11, 2025

Looks great, thank you for the PR. @vpratz can you please re-merge dev into this and see if tests pass? Ready to merge from my side otherwise.

@vpratz vpratz merged commit afc30ba into bayesflow-org:dev Apr 12, 2025
14 of 15 checks passed
@vpratz vpratz deleted the feat-integration-schedule branch April 12, 2025 08:08
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