Open j-wilson opened 10 months ago
@hstojic Here is a quick PR related to #793. I've opted to upload this here to better illustrate the goal of these changes. Additional tests and docstrings are needed. Ultimately, we may want to separate out the fix for #793, since this can likely be merged as is.
Related issue(s)/PRs:
Resolves #793
Summary
This PR introduces a
ScipyOptimizer
class for GPFlow Modules that automatically extracts parameter bounds and passes them togpflow.optimizers.Scipy
. This fixes an issue whereunconstrained_variables
that are actually constrained under the prior cause model fitting to fail.Additionally, this PR fixes a bug in
resample_hyperparameters
whereprior_on
was ignored.Fully backwards compatible: no
There are edge-cases which may cause this code to fail. For example,
Scipy
may choose to filter out parameters that it deems inactive and, in so doing, cause the provided bounds to be misspecified (since it does not filter out the corresponding bounds).PR checklist