-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring of configuration parameters parsing and *Test method dupl…
…ication remove (#372) Co-authored-by: Ivan Vikhrev <[email protected]> Co-authored-by: Zoya Maslova <[email protected]> Co-authored-by: Ilya Naumov <[email protected]> Co-authored-by: Zoya Maslova <[email protected]> Co-authored-by: just_sparta <[email protected]> Co-authored-by: Alexander Sesorov <[email protected]> Co-authored-by: Aleksandr Sesorov <[email protected]> Co-authored-by: Natalya Berezina <[email protected]>
- Loading branch information
1 parent
3d6432e
commit 1d5a883
Showing
51 changed files
with
731 additions
and
540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/benchmark/frameworks/config_parser/framework_parameters_parser.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/benchmark/frameworks/config_parser/test_reporter_cpp.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from .test_reporter import Test | ||
|
||
|
||
class CppTest(Test): | ||
def get_report(self, process): | ||
tensors_num = self.dep_parameters.inference_requests_count | ||
json_report_content = process.get_json_report_content() | ||
if process.get_status() == 0 and not tensors_num: | ||
self._log.info('InferenceRequestsCount is not set in XML config, ' | ||
'will try to extract it from the launcher JSON report or console output') | ||
tensors_num = json_report_content['configurations_setup']['tensors_num'] | ||
|
||
batch_size = self.indep_parameters.batch_size | ||
if process.get_status() == 0 and not batch_size: | ||
self._log.info('BatchSize is not set in XML config, ' | ||
'will try to extract it from the launcher JSON report') | ||
batch_size = json_report_content['configurations_setup']['batch_size'] | ||
|
||
actual_iterations = json_report_content['execution_results']['iterations_num'] | ||
|
||
parameters = self.prepare_framework_params() | ||
parameters['Infer request count'] = 1 | ||
parameters['Number of tensors'] = tensors_num | ||
parameters['Iteration count'] = actual_iterations | ||
optional_parameters_string = self._get_optional_parameters_string(parameters) | ||
|
||
report_res = { | ||
'task': self.model.task, | ||
'model': self.model.name, | ||
'dataset': self.dataset.name, | ||
'source_framework': self.model.source_framework, | ||
'inference_framework': self.indep_parameters.inference_framework, | ||
'precision': self.model.precision, | ||
'batch_size': batch_size, | ||
'mode': 'Sync', | ||
'framework_params': optional_parameters_string, | ||
} | ||
|
||
return report_res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.