Skip to content

Conversation

@LarsKue
Copy link
Contributor

@LarsKue LarsKue commented Mar 11, 2025

This PR

  • removes the old LambdaTransform
  • introduces a new NumpyTransform

This allows trivial serialization for the most common applications of the LambdaTransform.

@LarsKue LarsKue added the refactoring Some code shall be redesigned label Mar 11, 2025
@LarsKue LarsKue added this to the BayesFlow 2.0 milestone Mar 11, 2025
@LarsKue LarsKue self-assigned this Mar 11, 2025
@paul-buerkner
Copy link
Contributor

paul-buerkner commented Mar 12, 2025

Thank you! Looks good to me. Do we already have tests in place for this functionality? I also see that tests are failing. Is this because the LambdaTransform is still used in the tests?

LarsKue added 2 commits March 13, 2025 16:07
# Conflicts:
#	examples/Linear_Regression_Starter.ipynb
@LarsKue
Copy link
Contributor Author

LarsKue commented Mar 13, 2025

@paul-buerkner updated with tests

@LarsKue LarsKue mentioned this pull request Mar 17, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2025

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

Codecov Report

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

Files with missing lines Patch % Lines
bayesflow/adapters/transforms/numpy_transform.py 90.62% 3 Missing ⚠️

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

Files with missing lines Coverage Δ
bayesflow/adapters/adapter.py 76.39% <100.00%> (ø)
bayesflow/adapters/transforms/__init__.py 100.00% <100.00%> (ø)
bayesflow/adapters/transforms/as_set.py 93.75% <100.00%> (+0.89%) ⬆️
bayesflow/adapters/transforms/as_time_series.py 93.75% <100.00%> (+0.89%) ⬆️
bayesflow/adapters/transforms/expand_dims.py 100.00% <100.00%> (ø)
bayesflow/adapters/transforms/filter_transform.py 61.16% <ø> (+5.92%) ⬆️
bayesflow/adapters/transforms/log.py 100.00% <100.00%> (ø)
bayesflow/adapters/transforms/sqrt.py 85.71% <100.00%> (+2.38%) ⬆️
bayesflow/adapters/transforms/to_array.py 83.33% <100.00%> (ø)
bayesflow/adapters/transforms/numpy_transform.py 90.62% <90.62%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LarsKue
Copy link
Contributor Author

LarsKue commented Mar 17, 2025

@stefanradev93 I think the errors that came up in the CI are unrelated. Ready to merge from my side.

@LarsKue LarsKue requested a review from stefanradev93 March 17, 2025 16:21
@stefanradev93 stefanradev93 merged commit 8426dd1 into dev Mar 17, 2025
12 of 14 checks passed
@stefanradev93 stefanradev93 deleted the numpy-transforms branch March 17, 2025 22:53
@github-project-automation github-project-automation bot moved this from Future to Done in bayesflow development Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Some code shall be redesigned

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants