Skip to content

Commit aaeda4e

Browse files
authored
add comment for change in parmest
Added comment to be explicit that dict.fromkeys() is used instead of set() to preserve parameter ordering and thus make the problem deterministic.
1 parent 891d750 commit aaeda4e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pyomo/contrib/parmest/parmest.py

+1
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ def __init__(
309309
for experiment in self.exp_list:
310310
model = experiment.get_labeled_model()
311311
theta_names.extend([k.name for k, v in model.unknown_parameters.items()])
312+
# Utilize list(dict.fromkeys(theta_names)) to preserve parameter order compared with list(set(theta_names)), which had nondeterministic ordering of parameters
312313
self.estimator_theta_names = list(dict.fromkeys(theta_names))
313314

314315
self._second_stage_cost_exp = "SecondStageCost"

0 commit comments

Comments
 (0)