Skip to content

Commit

Permalink
Fix check for parameter priors
Browse files Browse the repository at this point in the history
We only care about estimated parameters.
  • Loading branch information
dweindl committed Nov 6, 2024
1 parent 4d77558 commit 5a6a167
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/parpe/hdf5_pe_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ def _check_support(self):
# starting points using petab. However, the current parpe C++
# resampling would ignore the initialization prior.
# And they wouldn't be supported for hierarchical optimization.
parameter_df = self.petab_problem.parameter_df
est_parameter_df = self.petab_problem.parameter_df[self.petab_problem.parameter_df[ptc.ESTIMATE] == 1]
for col_id in [
ptc.INITIALIZATION_PRIOR_TYPE, ptc.INITIALIZATION_PRIOR_PARAMETERS,
ptc.OBJECTIVE_PRIOR_TYPE, ptc.OBJECTIVE_PRIOR_PARAMETERS
]:
if (col := parameter_df.get(col_id)) is not None and col.notna().any():
if (col := est_parameter_df.get(col_id)) is not None and col.notna().any():
raise NotImplementedError("Priors are not supported yet.")

def generate_file(self, hdf5_file_name: str) -> None:
Expand Down

0 comments on commit 5a6a167

Please sign in to comment.