|
@@ -148,11 +148,20 @@ class Network:
|
|
|
|
|
|
def nextepoch(self):
|
|
|
"""Increment the current epoch, and return it."""
|
|
|
+ logging.info("Ending epoch %s", self.epoch)
|
|
|
for c in self.epochendingcallbacks:
|
|
|
c.epoch_ending(self.epoch)
|
|
|
self.epoch += 1
|
|
|
- for c in self.epochcallbacks:
|
|
|
+ logging.info("Starting epoch %s", self.epoch)
|
|
|
+ totcallbacks = len(self.epochcallbacks)
|
|
|
+ lastroundpercent = -1
|
|
|
+ for i, c in enumerate(self.epochcallbacks):
|
|
|
c.newepoch(self.epoch)
|
|
|
+ roundpercent = int(100*(i+1)/totcallbacks)
|
|
|
+ if roundpercent != lastroundpercent:
|
|
|
+ logging.info("%d%% complete", roundpercent)
|
|
|
+ lastroundpercent = roundpercent
|
|
|
+ logging.info("Epoch %s started", self.epoch)
|
|
|
return self.epoch
|
|
|
|
|
|
def wantepochticks(self, callback, want, end=False):
|