Skip to content

Commit

Permalink
Use predecessor stored in file (e.g. test case 0009) (#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
dilpath authored May 31, 2023
1 parent 97e1bbb commit 7d49422
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pypesto/select/method.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,19 @@ def __init__(
candidate_space.set_predecessor_model(predecessor_model)
# Else generate one based on the PEtab Select problem.
else:
self.candidate_space = (
self.petab_select_problem.new_candidate_space(
method=self.method,
predecessor_model=self.predecessor_model,
if predecessor_model is not None:
self.candidate_space = (
self.petab_select_problem.new_candidate_space(
method=self.method,
predecessor_model=self.predecessor_model,
)
)
else:
self.candidate_space = (
self.petab_select_problem.new_candidate_space(
method=self.method,
)
)
)
# May have changed from `None` to `petab_select.VIRTUAL_INITIAL_MODEL`
self.predecessor_model = self.candidate_space.get_predecessor_model()

Expand Down

0 comments on commit 7d49422

Please sign in to comment.