MCPcopy Index your code
hub / github.com/zai-org/CodeGeeX / print_datetime

Function print_datetime

codegeex/megatron/training.py:70–74  ·  view source on GitHub ↗

Note that this call will sync across all ranks.

(string)

Source from the content-addressed store, hash-verified

68
69
70def print_datetime(string):
71 """Note that this call will sync across all ranks."""
72 torch.distributed.barrier()
73 time_str = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
74 print_rank_0("[" + string + "] datetime: {} ".format(time_str))
75
76
77def pretrain(

Callers 2

pretrainFunction · 0.85
trainFunction · 0.85

Calls 1

print_rank_0Function · 0.90

Tested by

no test coverage detected