MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / log

Method log

SwissArmyTransformer/sat/training/utils.py:122–132  ·  view source on GitHub ↗

Log a group of timers.

(self, names, normalizer=1.0, reset=True)

Source from the content-addressed store, hash-verified

120 return self.timers[name]
121
122 def log(self, names, normalizer=1.0, reset=True):
123 """Log a group of timers."""
124 assert normalizer > 0.0
125 string = 'time (ms)'
126 for name in names:
127 if name not in self.timers:
128 continue
129 elapsed_time = self.timers[name].elapsed(
130 reset=reset) * 1000.0 / normalizer
131 string += ' | {}: {:.2f}'.format(name, elapsed_time)
132 print_rank0(string)
133
134
135def report_memory(name):

Callers 15

processFunction · 0.80
_get_lrMethod · 0.80
get_paramsMethod · 0.80
print_rank0Function · 0.80
print_allFunction · 0.80
get_timestep_embeddingFunction · 0.80
forward_Method · 0.80
gumbel_softmaxFunction · 0.80
evaluate_perplexityFunction · 0.80
forwardMethod · 0.80
trainFunction · 0.80

Calls 2

print_rank0Function · 0.90
elapsedMethod · 0.80

Tested by

no test coverage detected