Skip to content

Commit

Permalink
Merge branch 'develop' into fix_startpoint_sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl authored Nov 3, 2023
2 parents 57cb98f + ddf7798 commit d4cc00d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pypesto/petab/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
PREEQUILIBRATION_CONDITION_ID,
SIMULATION_CONDITION_ID,
)
from petab.models import MODEL_TYPE_SBML
except ImportError:
pass

Expand Down Expand Up @@ -134,7 +135,8 @@ def __init__(

self.validate_inner_options()

if validate_petab:
self.validate_petab = validate_petab
if self.validate_petab:
if petab.lint_problem(petab_problem):
raise ValueError("Invalid PEtab problem.")
if self._hierarchical and validate_petab_hierarchical:
Expand Down Expand Up @@ -286,7 +288,13 @@ def create_model(
logger.info(
f"Compiling amici model to folder " f"{self.output_folder}."
)
self.compile_model(**kwargs)
if self.petab_problem.model.type_id == MODEL_TYPE_SBML:
self.compile_model(
validate=self.validate_petab,
**kwargs,
)
else:
self.compile_model(**kwargs)
else:
logger.debug(
f"Using existing amici model in folder "
Expand Down

0 comments on commit d4cc00d

Please sign in to comment.