From 7b27ccdf12b5559aa8fd7058f7c08991a5fa6216 Mon Sep 17 00:00:00 2001 From: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> Date: Wed, 31 May 2023 20:40:16 +0200 Subject: [PATCH] Select: support version 0.1.8 (#1070) * set predecessor manually in multistart selection --- pypesto/select/method.py | 4 ---- pypesto/select/problem.py | 3 +++ setup.cfg | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pypesto/select/method.py b/pypesto/select/method.py index cf3655a50..dd266a76c 100644 --- a/pypesto/select/method.py +++ b/pypesto/select/method.py @@ -364,10 +364,6 @@ def __call__( calibrated_models=self.calibrated_models, newly_calibrated_models=newly_calibrated_models, excluded_model_hashes=self.calibrated_models.keys(), - # FIXME meaning changes here, i.e. predecessor model is used as previous - # predecessor model, since PEtab Select now gets the next predecessor - # model if the candidate space has models. - previous_predecessor_model=predecessor_model, criterion=self.criterion, ) predecessor_model = self.candidate_space.predecessor_model diff --git a/pypesto/select/problem.py b/pypesto/select/problem.py index e4863cdf3..969ac1307 100644 --- a/pypesto/select/problem.py +++ b/pypesto/select/problem.py @@ -242,6 +242,9 @@ def multistart_select( method_caller = self.create_method_caller(**kwargs) for start_index, predecessor_model in enumerate(predecessor_models): + method_caller.candidate_space.previous_predecessor_model = ( + predecessor_model + ) ( best_model, newly_calibrated_models_list[start_index], diff --git a/setup.cfg b/setup.cfg index e04963e39..38f82ce65 100644 --- a/setup.cfg +++ b/setup.cfg @@ -151,7 +151,7 @@ select = # Remove when vis is moved to PEtab Select version networkx >= 2.5.1 # End remove - petab-select >= 0.1.1 + petab-select >= 0.1.8 test = pytest >= 5.4.3 pytest-cov >= 2.10.0