[Rbm]
- abort by user [q] - cycle through training patetrn by [+],[-] keys [Status] - improved report interval - added on_report(): called every report iterval
This commit is contained in:
+3
-2
@@ -15,6 +15,7 @@ class Status:
|
||||
print(f"{key} : {value}{unit}")
|
||||
|
||||
def on_change(self, status: dict) -> bool:
|
||||
do_continue = True
|
||||
if status == {}:
|
||||
self.progress = -1
|
||||
|
||||
@@ -22,9 +23,9 @@ class Status:
|
||||
progress = status["progress"]['value']
|
||||
if self.progress < 0 or progress - self.progress >= self.update_interval:
|
||||
self.progress = progress
|
||||
self.on_report(status=status)
|
||||
do_continue = self.on_report(status=status)
|
||||
|
||||
return True
|
||||
return do_continue
|
||||
|
||||
def on_report(self, status: dict) -> bool:
|
||||
return True
|
||||
Reference in New Issue
Block a user