MCPcopy
hub / github.com/horovod/horovod / log_state

Function log_state

test/integration/data/elastic_tensorflow_keras_main.py:94–105  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

92
93
94def log_state(state):
95 state_dict = {
96 'epoch': state.epoch,
97 'batch': state.batch,
98 'commits': state.commits,
99 'hostname': hostname,
100 'start_rank': start_rank,
101 'rank': hvd.rank(),
102 'size': hvd.size(),
103 'rendezvous': state.rendezvous}
104 with open(args.logfile, 'a') as f:
105 f.write(json.dumps(state_dict) + os.linesep)
106
107
108def on_state_reset():

Callers 1

on_epoch_endMethod · 0.70

Calls 3

rankMethod · 0.45
sizeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…