Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anirban-chaudhuri committed Jul 3, 2024
1 parent 912356b commit 791a4d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyciemss/integration_utils/intervention_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def start_time_param_value_objective(
def intervention_generator(
x: torch.Tensor,
) -> Dict[float, Dict[str, Intervention]]:
assert x.size()[0] == param_size * 2
assert x.size()[0] == param_size * 2, "Size mismatch: check size for initial_guess_interventions and/or bounds_interventions"
static_parameter_interventions: Dict[float, Dict[str, Intervention]] = {}
for count in range(param_size):
if x[count * 2].item() in static_parameter_interventions:
Expand Down
6 changes: 3 additions & 3 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def __init__(
"static_parameter_interventions": start_time_param_value_objective(
param_name=["p_cbeta"],
),
"objfun": lambda x: -x,
"initial_guess_interventions": 1.0,
"bounds_interventions": [[0.0], [40.0]],
"objfun": lambda x: -x[0] * 0.25 / (0.0 - 40.0) + np.abs(0.35 - x[1]) * 1.0,
"initial_guess_interventions": [1.0, 0.15],
"bounds_interventions": [[0.0, 0.1], [40.0, 0.5]],
}

optimize_kwargs_SEIRHD_param_maxQoI = {
Expand Down

0 comments on commit 791a4d0

Please sign in to comment.