Skip to content

Commit

Permalink
Merge pull request #90 from KchnKchn/benchmark
Browse files Browse the repository at this point in the history
Benchmark fix
  • Loading branch information
valentina-kustikova authored Oct 2, 2019
2 parents 2b46ee6 + e55915a commit 9dc9bc9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/benchmark/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ def __init__(self, batch_size, mode, plugin, plugin_path, async_request_count, i
raise ValueError('Iteration count is required parameter. \
Iteration count can only take values: integer greater than zero.')
if self.mode == 'Sync':
if self._parameter_not_is_none(thread_count) and self._int_value_is_correct(thread_count):
self.nthreads = int(thread_count)
else:
raise ValueError('Thread count is required parameter for sync mode. \
Thread count can only take values: integer greater than zero.')
if self._parameter_not_is_none(thread_count):
if self._int_value_is_correct(thread_count):
self.nthreads = int(thread_count)
else:
raise ValueError('Thread count can only take values: integer greater than zero.')
if self._parameter_not_is_none(min_inference_time) and self._float_value_is_correct(min_inference_time):
self.min_inference_time = float(min_inference_time)
else:
Expand All @@ -150,11 +150,11 @@ def __init__(self, batch_size, mode, plugin, plugin_path, async_request_count, i
else:
raise ValueError('Async requiest count is required parameter for async mode. \
Async requiest count can only take values: integer greater than zero.')
if self._parameter_not_is_none(stream_count) and self._int_value_is_correct(stream_count):
self.nstreams = stream_count
else:
raise ValueError('Stream count is required parameter for async mode. \
Stream count can only take values: integer greater than zero.')
if self._parameter_not_is_none(stream_count):
if self._int_value_is_correct(stream_count):
self.nstreams = stream_count
else:
raise ValueError('Stream count can only take values: integer greater than zero.')


class test:
Expand Down
2 changes: 2 additions & 0 deletions src/benchmark/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def create_table_row(model, dataset, param, average_time, latency, fps):
parameters.update({'Min inference time(s)' : param.min_inference_time})
other_param = ''
for key in parameters:
if key == 'Min inference time(s)' and parameters[key] == 0.0:
continue
if parameters[key] != None:
other_param += '{}: {}, '.format(key, parameters[key])
other_param = other_param[:-2]
Expand Down

0 comments on commit 9dc9bc9

Please sign in to comment.