Skip to content

Commit

Permalink
adding start_time_param_value
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Szendrey committed Jul 17, 2024
1 parent 69c178f commit 477f968
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion service/models/operations/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from pyciemss.integration_utils.intervention_builder import (
param_value_objective,
start_time_objective,
start_time_param_value_objective,
)

from pyciemss.ouu.qoi import obs_nday_average_qoi, obs_max_qoi
Expand Down Expand Up @@ -116,7 +117,7 @@ def gen_pyciemss_args(self, job_id):
param_name=self.optimize_interventions.param_names,
param_value=param_value,
)
else:
if intervention_type == "start_time":
assert self.optimize_interventions.param_values is not None
param_value = [
torch.tensor(value)
Expand All @@ -126,6 +127,10 @@ def gen_pyciemss_args(self, job_id):
param_name=self.optimize_interventions.param_names,
param_value=param_value,
)
if intervention_type == "start_time_param_value":
optimize_interventions = start_time_param_value_objective(
param_name=self.optimize_interventions.param_names
)

extra_options = self.extra.dict()
inferred_parameters = fetch_inferred_parameters(
Expand Down

0 comments on commit 477f968

Please sign in to comment.