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

fix: FM, base_distribution.sample has no argument 'seed' #305

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

vpratz
Copy link
Collaborator

@vpratz vpratz commented Feb 11, 2025

The recent change to use the base distribution instead of a normal distribution in FlowMatching introduced an error, see #302 for an example. This PR fixes this by removing the seed kwarg and ensuring that self.base_distribution is built.

@vpratz vpratz added the bug label Feb 11, 2025
@vpratz vpratz added this to the BayesFlow 2.0 milestone Feb 11, 2025
@vpratz vpratz requested a review from LarsKue February 11, 2025 13:57
@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
bayesflow/networks/flow_matching/flow_matching.py 0.00% 5 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files with missing lines Coverage Δ
bayesflow/networks/flow_matching/flow_matching.py 82.07% <0.00%> (-5.81%) ⬇️

... and 23 files with indirect coverage changes

Copy link
Contributor

@LarsKue LarsKue left a comment

Choose a reason for hiding this comment

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

Looks like we should check self.built and call self.build() instead of checking self.base_distribution.

@vpratz
Copy link
Collaborator Author

vpratz commented Feb 11, 2025

Thanks for taking a look, I have adapted the code accordingly.

@vpratz vpratz merged commit 1081bbd into bayesflow-org:dev Feb 11, 2025
13 checks passed
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