MCPcopy Index your code
hub / github.com/tensorflow/tensorboard / main

Function main

tensorboard/scripts/execrooter.py:64–89  ·  view source on GitHub ↗

Invokes run function using a JSON file config. Args: args: CLI args, which can be a JSON file containing an object whose attributes are the parameters to the run function. If multiple JSON files are passed, their contents are concatenated. Returns: 0 if succe

(args)

Source from the content-addressed store, hash-verified

62
63
64def main(args):
65 """Invokes run function using a JSON file config.
66
67 Args:
68 args: CLI args, which can be a JSON file containing an object whose
69 attributes are the parameters to the run function. If multiple JSON
70 files are passed, their contents are concatenated.
71 Returns:
72 0 if succeeded or nonzero if failed.
73 Raises:
74 Exception: If input data is missing.
75 """
76 if not args:
77 raise Exception("Please specify at least one JSON config path")
78 inputs = []
79 program = []
80 outputs = []
81 for arg in args:
82 with open(arg) as fd:
83 config = json.load(fd)
84 inputs.extend(config.get("inputs", []))
85 program.extend(config.get("program", []))
86 outputs.extend(config.get("outputs", []))
87 if not program:
88 raise Exception("Please specify a program")
89 return run(inputs, program, outputs)
90
91
92if __name__ == "__main__":

Callers 2

execrooter.pyFile · 0.70
runFunction · 0.50

Calls 3

runFunction · 0.70
getMethod · 0.65
loadMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…