Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 087dfea

Browse files
authored
Add alternate method of parsing to enable orbit benchmarks (#529)
* Add logging lines for debugging purposes * Add logging. * Add alternate method of parsing Allow for benchmarks to be specified with the format <benchmark_class>:<benchmark_method_name>. * add logging to check contents of directory. * Log constructor_args * Add more logging * Remove nargs from flag --perfzero_constructor_args There should only ever be one argument to --perfzero_constructor_args (as all the args are grouped together in a JSON-serialized dict). * add more constructor arg logging * Remove extra logging lines. * Remove extra logging * Remove logging
1 parent de42daf commit 087dfea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

perfzero/lib/perfzero/benchmark_method_runner.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,12 @@ def _run_internal(benchmark_method, harness_info, site_package_info,
6969
else:
7070
model_output_dir = output_dir
7171
utils.make_dir_if_not_exist(output_dir)
72-
benchmark_class, benchmark_method_name = benchmark_method.rsplit('.', 1)
72+
if ':' in benchmark_method:
73+
benchmark_class, benchmark_method_name = benchmark_method.rsplit(':', 1)
74+
else:
75+
benchmark_class, benchmark_method_name = benchmark_method.rsplit('.', 1)
7376
benchmark_class_name = benchmark_class.rsplit('.', 1)[1]
74-
77+
7578
tensorflow_profiler = TensorFlowProfiler(
7679
config.profiler_enabled_time_str, output_dir)
7780
process_info_tracker = ProcessInfoTracker(output_dir)

0 commit comments

Comments
 (0)