def compute(self): logging.info("Computing " + self.path) yaml = TR_Exec.compute(self.cmd) res = TR_Map_List.from_yaml(yaml) self.res = res.sort_by(self.field) if not self.exists(): return l = self.res.get_lambda_eval(self.field) self.min = l(self.res[-1]) self.max = l(self.res[0])
def compute(self): if self.computed: return res = {} for mod in self.mods: opt = { '-step': self.ggm['step'], '-mods': mod, '-ggm': "%d %d" % (self.ggm['good'], self.ggm['miss']) } yaml = TR_Exec.compute(self.cmd, opt) res[mod] = TR_Map_List.from_yaml(yaml) if self.merge_mods: l = TR_Map_List() for key in res: l.extend(res[key]) self.res = {'__': l} else: self.res = res for key in self.res: self.res[key] = self.sort_maps(self.res[key]) self.computed = True
def compute(self): tmp = TR_Exec.compute(self.cmd, self.opt) tmp = TR_Map_List.from_yaml(tmp, TR_Map_With_Objects) self.res = tmp.sort_by('difficulty', False)