MCPcopy
hub / github.com/k2-fsa/OmniVoice / update

Method update

omnivoice/training/checkpoint.py:66–83  ·  view source on GitHub ↗

Called every step to update the progress bar UI.

(
        self, step: int, loss: Optional[float] = None, lr: Optional[float] = None
    )

Source from the content-addressed store, hash-verified

64 )
65
66 def update(
67 self, step: int, loss: Optional[float] = None, lr: Optional[float] = None
68 ):
69 """
70 Called every step to update the progress bar UI.
71 """
72 if self.progress_bar:
73 self.progress_bar.update(1)
74
75 # Update real-time metrics on the progress bar itself
76 postfix = {}
77 if loss is not None:
78 postfix["loss"] = f"{loss:.4f}"
79 if lr is not None:
80 postfix["lr"] = f"{lr:.2e}"
81
82 if postfix:
83 self.progress_bar.set_postfix(postfix)
84
85 def log_metrics(self, step: int, metrics: Dict[str, Any]):
86 """

Callers 11

trainMethod · 0.95
voice_design.pyFile · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
drain_completedFunction · 0.80
drain_completedFunction · 0.80
drain_completedFunction · 0.80
pack_datasetFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected