MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / __exit__

Method __exit__

trainer/base_trainer.py:377–384  ·  view source on GitHub ↗
(self, exc_type, exc_val, exc_tb)

Source from the content-addressed store, hash-verified

375 return self
376
377 def __exit__(self, exc_type, exc_val, exc_tb):
378 torch.cuda.synchronize()
379 self.end_time = time()
380 msg = f'Elapsed time for {self.name}: {self.elapsed_time:.3f} s'
381 if self.logger is not None:
382 self.logger.info(msg, main_process_only=True)
383 else:
384 print(msg)
385
386
387# https://github.com/hpcaitech/Open-Sora/blob/main/opensora/utils/train_utils.py#L44

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected