MCPcopy
hub / github.com/GPflow/GPflow / plot_from_argv

Function plot_from_argv

benchmark/plot.py:128–162  ·  view source on GitHub ↗

Plot previously collected metrics, based on command line arguments.

()

Source from the content-addressed store, hash-verified

126
127
128def plot_from_argv() -> None:
129 """ Plot previously collected metrics, based on command line arguments. """
130 parser = argparse.ArgumentParser(description="Plot a benchmark suite.")
131 parser.add_argument(
132 "--no_subdir",
133 "--no-subdir",
134 action="store_true",
135 help="By default this script will create a subdirectory inside `dest` and write output to"
136 " that. Setting this flag will suppress the subdirectory and use `dest` directly.",
137 )
138 parser.add_argument(
139 "suite",
140 type=str,
141 choices=BENCHMARK_SUITES.names(),
142 help="Which benchmark suite to run.",
143 )
144 parser.add_argument(
145 "sources",
146 type=Path,
147 nargs="+",
148 help="Directory(s) to read data from."
149 " These will be recursively crawled to find all `metrics.csv`s.",
150 )
151 parser.add_argument(
152 "dest",
153 type=Path,
154 help="Directory to write results to.",
155 )
156 args = parser.parse_args()
157
158 metadata = BenchmarkMetadata.create(args.suite)
159 suite = BENCHMARK_SUITES.get(args.suite)
160 results_df, results_metadata = _crawl_sources(args.sources)
161 dest = setup_dest(metadata, args.dest, args.no_subdir)
162 plot(metadata, suite, results_df, results_metadata, dest)
163
164
165if __name__ == "__main__":

Callers 1

plot.pyFile · 0.85

Calls 6

setup_destFunction · 0.90
_crawl_sourcesFunction · 0.85
namesMethod · 0.80
createMethod · 0.80
getMethod · 0.80
plotFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…