Skip to content

v2.0.2 #447

New issue

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

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

Already on GitHub? # to your account

Merged
merged 34 commits into from
Apr 26, 2025
Merged

v2.0.2 #447

merged 34 commits into from
Apr 26, 2025

Conversation

LarsKue
Copy link
Contributor

@LarsKue LarsKue commented Apr 25, 2025

  • More Tests, including Notebooks
  • Fixed Optimal Transport for JAX
  • Improved Dispatch for Inference and Summary Networks (used in Workflows)
  • Improved README
  • Fixed a warning about missing compile_from_config when loading approximators
  • Add NumFOCUS Affiliation
  • Add Issue Templates

vpratz and others added 19 commits April 23, 2025 11:49
…ent code

Torch is very slow, so I had to increase the timeout accordingly.
* summary networks: add tests for using functional API

* fix build functions for use with functional API
* fix docs of coupling flow

* add additional tests
In addition, this PR limits the slow test to Windows and Python 3.10.
The choices are somewhat arbitrary, my thought was to test the setup not
covered as much through use by the devs.
…move update-workflows branch from workflow style tests, add __init__ and conftest to test_point_approximators (#443)
* implement compile_from_config and get_compile_config

* add optimizer build to compile_from_config
* remove the is_symbolic_tensor check because this would otherwise skip the whole function for compiled contexts

* skip pyabc test

* fix sinkhorn and log_sinkhorn message formatting for jax by making the warning message worse
@LarsKue LarsKue requested a review from stefanradev93 April 25, 2025 23:03
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

Attention: Patch coverage is 95.34884% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...low/approximators/model_comparison_approximator.py 40.00% 6 Missing ⚠️
bayesflow/approximators/continuous_approximator.py 91.66% 1 Missing ⚠️
bayesflow/distributions/mixture.py 87.50% 1 Missing ⚠️
Files with missing lines Coverage Δ
bayesflow/__init__.py 92.59% <100.00%> (ø)
bayesflow/approximators/approximator.py 82.22% <100.00%> (+22.22%) ⬆️
bayesflow/approximators/point_approximator.py 68.67% <100.00%> (ø)
bayesflow/distributions/__init__.py 100.00% <ø> (ø)
bayesflow/distributions/diagonal_normal.py 95.45% <100.00%> (+0.10%) ⬆️
bayesflow/distributions/diagonal_student_t.py 96.00% <100.00%> (+0.08%) ⬆️
bayesflow/links/ordered.py 97.05% <100.00%> (+0.18%) ⬆️
bayesflow/metrics/maximum_mean_discrepancy.py 100.00% <100.00%> (ø)
bayesflow/metrics/root_mean_squard_error.py 77.77% <100.00%> (+6.34%) ⬆️
...w/networks/consistency_models/consistency_model.py 98.47% <100.00%> (+18.47%) ⬆️
... and 21 more

... and 24 files with indirect coverage changes

LarsKue added 2 commits April 25, 2025 19:58
* Hotfix Version 2.0.1 (#431)

* fix optimal transport config (#429)

* run linter

* [skip-ci] bump version to 2.0.1

* Update issue templates
@LarsKue LarsKue self-assigned this Apr 26, 2025
@LarsKue LarsKue requested a review from Copilot April 26, 2025 00:03
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR releases version v2.0.2 with several improvements and fixes across the BayesFlow codebase including new tests, better handling of input shapes via decorators, refined network layers, improved error handling in distributions, updated workflow configurations, and new issue templates.

  • Added sanitize_input_shape decorators to several network functions
  • Refactored distributions to use trainable_parameters instead of use_learnable_parameters and adjusted related operations
  • Enhanced configuration methods for approximators and updated docs/workflows

Reviewed Changes

Copilot reviewed 51 out of 51 changed files in this pull request and generated no comments.

Show a summary per file
File Description
bayesflow/networks/transformers/*.py Added sanitize_input_shape decorators and adjusted imports
bayesflow/metrics/*.py Added serializable decorator and minor import adjustments
bayesflow/distributions/*.py Refactored parameter naming and tensor operations
bayesflow/approximators/*.py Added compile_from_config and get_compile_config methods
README.md, .github/* Updated docs, affiliation badge, workflows, and issue templates
Comments suppressed due to low confidence (3)

bayesflow/distributions/mixture.py:56

  • The identifier 'ops' is used here without an import. Please add an import statement (e.g., 'from keras import ops') at the top of the file.
self.mixture_logits = ops.ones(shape=len(distributions))

bayesflow/approximators/model_comparison_approximator.py:121

  • The methods compile_from_config and get_compile_config use 'deserialize' and 'serialize' but there is no visible import for these functions. Ensure they are imported (e.g., from bayesflow.utils.serialization) to avoid runtime errors.
def compile_from_config(self, config):

bayesflow/approximators/continuous_approximator.py:107

  • Similar to model_comparison_approximator.py, this file uses 'deserialize' and 'serialize' without an explicit import. Please verify that these functions are imported properly.
def compile_from_config(self, config):

Copy link
Contributor

@stefanradev93 stefanradev93 left a comment

Choose a reason for hiding this comment

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

🚀

@stefanradev93 stefanradev93 merged commit 822ad89 into main Apr 26, 2025
16 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants