MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / update

Method update

util/utils.py:530–540  ·  view source on GitHub ↗

return if the results is the best.

(self, new_res, epoch, is_ema=False)

Source from the content-addressed store, hash-verified

528 self.best_regular = BestMetricSingle(init_res, better)
529
530 def update(self, new_res, epoch, is_ema=False):
531 """return if the results is the best."""
532 if not self.use_ema:
533 return self.best_all.update(new_res, epoch)
534 else:
535 if is_ema:
536 self.best_ema.update(new_res, epoch)
537 return self.best_all.update(new_res, epoch)
538 else:
539 self.best_regular.update(new_res, epoch)
540 return self.best_all.update(new_res, epoch)
541
542 def summary(self):
543 if not self.use_ema:

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected