Skip to content

Conversation

@vpratz
Copy link
Collaborator

@vpratz vpratz commented Feb 21, 2025

Fixes #329.

This PR adds a decorator sanitize_input_shape to replace the first entry of input_shape with a dummy batch size of 32 in case it is None.
The decorator is added to the relevant network build functions.

If you have any ideas/wishes regarding naming, please let me know and I'll adjust it.

@vpratz vpratz requested a review from stefanradev93 February 21, 2025 08:42
@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2025

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

Codecov Report

Attention: Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
bayesflow/utils/decorators.py 70.00% 3 Missing ⚠️

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

Files with missing lines Coverage Δ
bayesflow/networks/deep_set/deep_set.py 100.00% <100.00%> (ø)
bayesflow/networks/deep_set/equivariant_module.py 97.22% <100.00%> (+0.16%) ⬆️
bayesflow/networks/deep_set/invariant_module.py 94.44% <100.00%> (+0.32%) ⬆️
bayesflow/networks/lstnet/lstnet.py 100.00% <100.00%> (ø)
bayesflow/networks/lstnet/skip_recurrent.py 100.00% <100.00%> (ø)
bayesflow/networks/summary_network.py 51.85% <100.00%> (+3.85%) ⬆️
bayesflow/utils/decorators.py 74.32% <70.00%> (+0.88%) ⬆️

@vpratz vpratz requested a review from LarsKue February 21, 2025 09:10
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 good to me. Ideally, in the long term, we should move away from the (expensive and unreliable) way of using self.call in self.build, though.

@LarsKue LarsKue merged commit 07ec251 into bayesflow-org:dev Feb 21, 2025
13 checks passed
@vpratz
Copy link
Collaborator Author

vpratz commented Feb 21, 2025

Thanks for the quick review!

@vpratz vpratz deleted the feat-functional-api-nets branch March 1, 2025 08:56
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