d953b47ada9e984ba5a7a8a53be7ffba5cb22f17,framework/Optimizers/RavenSampled.py,RavenSampled,localFinalizeActualSampling,#RavenSampled#Any#Any#Any#,236

Before Change


    // trim down opt point to the useful parts
    // TODO making a new dict might be costly, maybe worth just passing whole point?
    //// testing suggests no big deal on smaller problem
    rlz = dict((var, full[var]) for var in (list(self.toBeSampled.keys()) + [self._objectiveVar] + list(self.dependentSample.keys())))
    // the sign of the objective function is flipped in case we do maximization
    // so get the correct-signed value into the realization
    if self._minMax == "max":
      rlz[self._objectiveVar] *= -1

After Change


      _, rlz = self._targetEvaluation.realization(matchDict={"prefix": prefix}, asDataSet=False)
    else:
      // NOTE if here, then rlz is actually a xr.Dataset, NOT a dictionary!!
      _, rlz = self._targetEvaluation.realization(matchDict={"batchId": self.batchId}, asDataSet=True,options={"returnAllMatch":True})
    // _, full = self._targetEvaluation.realization(matchDict={"prefix": prefix}, asDataSet=False)
    if self._targetEvaluation.isEmpty:
      self.raiseAnError(RuntimeError, f"Expected to find entry with prefix "{prefix}" in TargetEvaluation "{self._targetEvaluation.name}", but it is empty!")
    _, full = self._targetEvaluation.realization(matchDict={"prefix": prefix})
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: idaholab/raven
Commit Name: d953b47ada9e984ba5a7a8a53be7ffba5cb22f17
Time: 2021-02-15
Author: andrea.alfonsi@inl.gov
File Name: framework/Optimizers/RavenSampled.py
Class Name: RavenSampled
Method Name: localFinalizeActualSampling


Project Name: probcomp/bayeslite
Commit Name: 31c232a1db143769ec0e3d172f98841f63a63c66
Time: 2015-02-20
Author: riastradh+probcomp@csail.mit.edu
File Name: src/imp.py
Class Name:
Method Name:


Project Name: sahana/eden
Commit Name: d1717b1515524739be4d7cf0bee8fb5e162ee2eb
Time: 2018-09-26
Author: dominic@nursix.org
File Name: modules/s3db/event.py
Class Name: event_IncidentAssignMethod
Method Name: apply_method


Project Name: probcomp/bayeslite
Commit Name: 4be6033a18460775a87d5915aba1e1fd199cca91
Time: 2015-03-09
Author: riastradh+probcomp@csail.mit.edu
File Name: src/imp.py
Class Name:
Method Name: