diff --git a/petab_select/candidate_space.py b/petab_select/candidate_space.py index 05bbdc62..149fc295 100644 --- a/petab_select/candidate_space.py +++ b/petab_select/candidate_space.py @@ -791,7 +791,7 @@ def update_after_calibration( logging.info("Switching method") self.switch_method(calibrated_models=calibrated_models) self.switch_inner_candidate_space( - calibrated_models=calibrated_models, + exclusions=list(calibrated_models), ) logging.info( "Method switched to ", self.inner_candidate_space.method @@ -1021,10 +1021,14 @@ def update_method(self, method: Method): def switch_inner_candidate_space( self, - calibrated_models: Dict[str, Model], + exclusions: List[str], ): - """Switch ``self.inner_candidate_space`` to the candidate space of - the current self.method.""" + """Switch the inner candidate space to match the current method. + + Args: + exclusions: + Hashes of excluded models. + """ # if self.method != Method.MOST_DISTANT: self.inner_candidate_space = self.inner_candidate_spaces[self.method] @@ -1032,7 +1036,7 @@ def switch_inner_candidate_space( # calibrated models self.inner_candidate_space.reset( predecessor_model=self.predecessor_model, - exclusions=calibrated_models, + exclusions=exclusions, ) def jump_to_most_distant(