-
Notifications
You must be signed in to change notification settings - Fork 128
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
API simplify DensityEstimator base class #1072
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1072 +/- ##
==========================================
- Coverage 85.13% 76.86% -8.27%
==========================================
Files 90 89 -1
Lines 6651 6558 -93
==========================================
- Hits 5662 5041 -621
- Misses 989 1517 +528
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Finally it's green ^^ |
Great :). I just checked with @michaeldeistler, who also works on the Density estimator functionality in #1066; so, we will delay merging this until #1066 is done. |
#1138 conflicts with this PR. I am not sure how to solve the conflict here:
I think if we have def _check_shape(self, x=None, theta=None):
if x is not None:
check_input_shape(x, self._input_shape)
if theta is not None:
check_condition_shape(theta, self.condition_shape) maybe this could also handle some of the reshaping from #1066? |
Yes, this has a lot of conflicts with the changes to the shaping we made and we want this PR to be merged asap. @manuelgloeckler planned to continuing this PR. I think he will either merge this branch into a new feature branch from I see the point about the sbi/sbi/neural_nets/density_estimators/base.py Lines 132 to 157 in 005aeac
And we also have other functions that are used by the SBI methods to check the correctness of the shape, e.g.,
|
Simplify the
DensityEstimator
base class and make it an abstract class.Remove unnecessary functions
Estimator
base classA step in the direction of #1046