-
Notifications
You must be signed in to change notification settings - Fork 63
Adapter scale and shift #394
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
bayesflow/approximators/model_comparison_approximator.py:256
- The tuple unpacking of the classifier_network may lead to issues if the deserialize function does not return an iterable. Consider assigning the output directly and verifying its format.
(config["classifier_network"],) = deserialize(config["classifier_network"], custom_objects=custom_objects)
def scale(self, keys: str | Sequence[str], by: float | np.ndarray): | ||
from .transforms import Scale | ||
|
||
self.transforms.append(MapTransform({key: Scale(scale=by) for key in keys})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MapTransform is referenced but not imported. Please add an import statement for MapTransform to ensure it is defined.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
tests/test_adapters/conftest.py:23
- [nitpick] The key 'x' used for scaling and shifting might be ambiguous; consider using a more descriptive name to improve code clarity.
.scale("x", by=[-1, 2])
bayesflow/adapters/adapter.py:559
- [nitpick] Consider moving the import statements out of the function bodies to the top of the module for consistency and potential performance improvements.
from .transforms import Scale
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
Addresses #353