MCPcopy
hub / github.com/facebookresearch/mmf / run

Function run

tools/run.py:74–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73
74def run():
75 setup_imports()
76 parser = flags.get_parser()
77 args = parser.parse_args()
78 trainer = build_trainer(args)
79
80 # Log any errors that occur to log file
81 try:
82 trainer.load()
83 trainer.train()
84 except Exception as e:
85 writer = getattr(trainer, "writer", None)
86
87 if writer is not None:
88 writer.write(e, "error", donot_print=True)
89 if is_main_process():
90 raise
91
92
93if __name__ == "__main__":

Callers 1

run.pyFile · 0.85

Calls 7

build_trainerFunction · 0.90
is_main_processFunction · 0.90
setup_importsFunction · 0.85
trainMethod · 0.80
writeMethod · 0.80
get_parserMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected