Skip to content

Commit

Permalink
remove governing_method from ui
Browse files Browse the repository at this point in the history
  • Loading branch information
dilpath committed Dec 17, 2023
1 parent ad78660 commit 6d894b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions petab_select/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np
import petab

from .candidate_space import CandidateSpace
from .candidate_space import CandidateSpace, FamosCandidateSpace
from .constants import INITIAL_MODEL_METHODS, TYPE_PATH, Criterion, Method
from .model import Model, default_compare
from .problem import Problem
Expand Down Expand Up @@ -137,7 +137,7 @@ def candidates(
# Else, in case we jumped to most distant in this iteration, go into
# calibration with only the model we've jumped to.
if (
candidate_space.governing_method == Method.FAMOS
isinstance(candidate_space, FamosCandidateSpace)
and candidate_space.jumped_to_most_distant
):
return candidate_space
Expand Down Expand Up @@ -179,7 +179,7 @@ def candidates(
# if the candidate space is able to switch methods.
# N.B.: candidate spaces that switch methods must raise `StopIteration`
# when they stop switching.
if candidate_space.governing_method == Method.FAMOS:
if isinstance(candidate_space, FamosCandidateSpace):
try:
candidate_space.update_after_calibration(
calibrated_models=calibrated_models,
Expand Down Expand Up @@ -310,7 +310,7 @@ def write_summary_tsv(
# FIXME remove once MostDistantCandidateSpace exists...
method = candidate_space.method
if (
candidate_space.governing_method == Method.FAMOS
isinstance(candidate_space, FamosCandidateSpace)
and isinstance(candidate_space.predecessor_model, Model)
and candidate_space.predecessor_model.predecessor_model_hash is None
):
Expand Down

0 comments on commit 6d894b5

Please sign in to comment.