MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / run_main

Function run_main

python/graphvite/cmd.py:140–163  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

138
139
140def run_main(args):
141 cfg = load_config(args.config)
142 if args.gpu is not None:
143 cfg.resource.gpus = range(args.gpu)
144 if args.cpu is not None:
145 cfg.resource.cpu_per_gpu = args.cpu
146 if args.epoch is not None:
147 cfg.train.num_epoch = args.epoch
148
149 app = gap.Application(cfg.application, **cfg.resource)
150 if "format" in cfg:
151 app.set_format(**cfg.format)
152 app.load(**cfg.graph)
153 app.build(**cfg.build)
154 if "load" in cfg:
155 app.load_model(**cfg.load)
156 app.train(**cfg.train)
157 if args.eval and "evaluate" in cfg:
158 if isinstance(cfg.evaluate, dict):
159 cfg.evaluate = [cfg.evaluate]
160 for evaluation in cfg.evaluate:
161 app.evaluate(**evaluation)
162 if "save" in cfg:
163 app.save_model(**cfg.save)
164
165
166def visualize_main(args):

Callers

nothing calls this directly

Calls 8

load_configFunction · 0.85
set_formatMethod · 0.80
loadMethod · 0.80
load_modelMethod · 0.80
evaluateMethod · 0.80
save_modelMethod · 0.80
buildMethod · 0.45
trainMethod · 0.45

Tested by

no test coverage detected