Skip to content

Commit

Permalink
asserting in input, causes silent bugs otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalIversen committed Jan 15, 2025
1 parent 68f2aa8 commit f1f46d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drevalpy/models/drp_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,15 @@ def get_concatenated_features(
cell_line_input=cell_line_input,
drug_input=drug_input,
)
if drug_view is not None:
if drug_view not in inputs:
raise ValueError(f"Expected drug_view '{drug_view}' to be in inputs, but it was not. Inputs: {inputs}")
if cell_line_view is not None:
if cell_line_view not in inputs:
raise ValueError(
f"Expected cell_line_view '{cell_line_view}' to be in inputs, but it was not. Inputs: {inputs}"
)

cell_line_features = None if cell_line_view is None else inputs.get(cell_line_view)
drug_features = None if drug_view is None else inputs.get(drug_view)

Expand Down

0 comments on commit f1f46d0

Please sign in to comment.