MCPcopy
hub / github.com/zai-org/CogView / stop

Method stop

utils.py:96–101  ·  view source on GitHub ↗

Stop the timer.

(self)

Source from the content-addressed store, hash-verified

94 self.started_ = True
95
96 def stop(self):
97 """Stop the timer."""
98 assert self.started_, 'timer is not started'
99 torch.cuda.synchronize()
100 self.elapsed_ += (time.time() - self.start_time)
101 self.started_ = False
102
103 def reset(self):
104 """Reset timer."""

Callers 5

elapsedMethod · 0.95
get_batchFunction · 0.80
forward_stepFunction · 0.80
backward_stepFunction · 0.80
train_stepFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected