Open aprsa opened 2 years ago
This will require some (more) thought:
b['fit_parameters'].expand_value()
(which is available to the user, but also is used internally to determine what parameters to pass to the optimizer) matches all visible parameters and is not aware of which compute options will be used, so will expand to include both pblums. Ideally, to avoid any confusion of the underlying behavior, this logic would be able to be extended to know about the referenced compute options and not include values from disabled datasets. But then this logic will need to also account for passing compute
as a keyword argument to run_solver
.
The other option would be to cover this in b.run_checks_solver
to either raise a warning or an error. If just a warning, we could conceivably drop parameters from disabled datasets within the solver itself. The fitted parameters are available in the solution, so even if the warning isn't noticed, there will still be some indication of the "dropped" parameters when comparing to the expanded value of the input fit_parameters
.
Say we add two datasets and disable one; then we add
pblum@primary
to be adjusted. This will adjust both the enabled and the disable dataset'spblum@primary
. A simple workaround is to be explicit and addpblum@primary@enabled_dataset
, but this should not be a requirement.Minimal example: