3cee81f6d6f9637d21aad32d360844f6ce7a90c4,framework/Optimizers/GradientBasedOptimizer.py,GradientBasedOptimizer,_removeRedundantTraj,#GradientBasedOptimizer#Any#Any#,294

Before Change


          inp = copy.deepcopy(self.optVarsHist[traj][updateKey]) //FIXME deepcopy needed?
          removeLocalFlag = True
          for var in self.optVars:
            if abs(inp[var] - currentInput[var]) > self.thresholdTrajRemoval:
              removeLocalFlag = False
              break
          if removeLocalFlag:
            removeFlag = True
            break
        if removeFlag:

After Change


          removeLocalFlag = True
          dist = np.sqrt(np.sum(list((inp[var] - currentInput[var])**2 for var in self.getOptVars())))
          if dist < self.thresholdTrajRemoval:
            self.raiseADebug("Halting trajectory "{}" because it is following trajectory "{}"".format(trajToRemove,traj))
            self.trajectoriesKilled[traj].append(trajToRemove)
            //TODO the trajectory to remove should be chosen more carefully someday, for example, the one that has the smallest steps or lower loss value currently
            removeFlag = True
            break
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: idaholab/raven
Commit Name: 3cee81f6d6f9637d21aad32d360844f6ce7a90c4
Time: 2017-06-21
Author: paul.talbot@inl.gov
File Name: framework/Optimizers/GradientBasedOptimizer.py
Class Name: GradientBasedOptimizer
Method Name: _removeRedundantTraj


Project Name: idaholab/raven
Commit Name: 9a0e0b4a450fe0f2f7118182adab6a47dd241964
Time: 2019-01-31
Author: paul.talbot@inl.gov
File Name: framework/Optimizers/SPSA.py
Class Name: SPSA
Method Name: localInputAndChecks


Project Name: idaholab/raven
Commit Name: 9a0e0b4a450fe0f2f7118182adab6a47dd241964
Time: 2019-01-31
Author: paul.talbot@inl.gov
File Name: framework/Optimizers/GradientBasedOptimizer.py
Class Name: GradientBasedOptimizer
Method Name: finalizeSampler