Skip to content

Commit 774fc5e

Browse files
authored
[DEPLOYMENT] Jenkins remote deployment (#564)
1 parent 4088063 commit 774fc5e

File tree

88 files changed

+516
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+516
-50
lines changed

src/benchmark/config_processor.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ def parse_independent_parameters(self, curr_test):
8686
batch_size = _batch_size.data if (_batch_size and _batch_size.data != 'None') else None
8787

8888
device = indep_parameters_tag.getElementsByTagName('Device')[0].firstChild.data.strip()
89+
python_path = 'python3'
90+
91+
if indep_parameters_tag.getElementsByTagName('PythonInterpreter')[0].firstChild:
92+
python_path = indep_parameters_tag.getElementsByTagName('PythonInterpreter')[0].firstChild.data.strip()
93+
8994
iteration_count = indep_parameters_tag.getElementsByTagName('IterationCount')[0].firstChild.data.strip()
9095
test_time_limit = int(indep_parameters_tag.getElementsByTagName('TestTimeLimit')[0].firstChild.data)
9196
timeout_overhead_element = indep_parameters_tag.getElementsByTagName('TimeoutOverhead')
@@ -129,6 +134,7 @@ def parse_independent_parameters(self, curr_test):
129134
timeout_overhead=timeout_overhead,
130135
custom_models_links=custom_models_links,
131136
raw_output=raw_output,
137+
python_path=python_path,
132138
)
133139

134140
def parse_dependent_parameters(self, curr_test, framework):

src/benchmark/frameworks/config_parser/framework_independent_parameters.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
class FrameworkIndependentParameters(FrameworkParameters):
55
def __init__(self, inference_framework, batch_size, device, iterarion_count, test_time_limit,
6-
timeout_overhead, custom_models_links=None, raw_output=True, num_gpu_devices=None):
6+
timeout_overhead, custom_models_links=None, raw_output=True, num_gpu_devices=None,
7+
python_path='python3'):
78
self.inference_framework = None
89
self.batch_size = None
910
self.device = None
@@ -12,6 +13,7 @@ def __init__(self, inference_framework, batch_size, device, iterarion_count, tes
1213
self.test_time_limit = None
1314
self.custom_models_links = custom_models_links
1415
self.raw_output = raw_output
16+
self.python_path = 'python3'
1517
if self._parameter_is_not_none(inference_framework):
1618
self.inference_framework = inference_framework
1719
else:
@@ -43,3 +45,4 @@ def __init__(self, inference_framework, batch_size, device, iterarion_count, tes
4345
else:
4446
default_timeout_overhead = 300
4547
self.timeout_overhead = default_timeout_overhead
48+
self.python_path = python_path

src/benchmark/frameworks/dgl_pytorch/dgl_pytorch_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def get_performance_metrics(self):
2020

2121
def _fill_command_line(self):
2222
path_to_pytorch_script = Path.joinpath(self.inference_script_root, 'inference_dgl_pytorch.py')
23-
python = ProcessHandler.get_cmd_python_version()
23+
python = ProcessHandler.get_cmd_python_version(self._test)
2424

2525
name = self._test.model.name
2626
model = self._test.model.model

src/benchmark/frameworks/executorch/executorch_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def get_performance_metrics(self):
1919
return self.get_performance_metrics_from_json_report()
2020

2121
def _fill_command_line(self):
22-
python = ProcessHandler.get_cmd_python_version()
22+
python = ProcessHandler.get_cmd_python_version(self._test)
2323
dataset = self._test.dataset.path
2424
input_shape = self._test.dep_parameters.input_shape
2525
layout = self._test.dep_parameters.layout

src/benchmark/frameworks/intel_caffe/intel_caffe_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def get_performance_metrics(self):
1919

2020
def _fill_command_line(self):
2121
path_to_intelcaffe_script = Path.joinpath(self.inference_script_root, 'inference_caffe.py')
22-
python = ProcessHandler.get_cmd_python_version()
22+
python = ProcessHandler.get_cmd_python_version(self._test)
2323

2424
model_prototxt = self._test.model.model
2525
model_caffemodel = self._test.model.weight

src/benchmark/frameworks/mxnet/mxnet_process.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def get_performance_metrics(self):
9797
def _fill_command_line(self):
9898
path_to_sync_script = Path.joinpath(self.inference_script_root,
9999
'inference_mxnet_sync_mode.py')
100-
python = ProcessHandler.get_cmd_python_version()
100+
python = ProcessHandler.get_cmd_python_version(self._test)
101101
time_limit = self._test.indep_parameters.test_time_limit
102102
common_params = super()._fill_command_line()
103103
common_params += f' --time {time_limit}'
@@ -116,7 +116,7 @@ def get_performance_metrics(self):
116116
def _fill_command_line(self):
117117
path_to_async_script = Path.joinpath(self.inference_script_root,
118118
'inference_mxnet_async_mode.py')
119-
python = ProcessHandler.get_cmd_python_version()
119+
python = ProcessHandler.get_cmd_python_version(self._test)
120120
common_params = super()._fill_command_line()
121121
command_line = f'{python} {path_to_async_script} {common_params}'
122122

src/benchmark/frameworks/ncnn/ncnn_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def get_performance_metrics(self):
2020

2121
def _fill_command_line(self):
2222
path_to_ncnn_script = Path.joinpath(self.inference_script_root, 'inference_ncnn.py')
23-
python = ProcessHandler.get_cmd_python_version()
23+
python = ProcessHandler.get_cmd_python_version(self._test)
2424

2525
name = self._test.model.name
2626
model = self._test.model.model

src/benchmark/frameworks/onnx_runtime_python/onnx_runtime_python_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def get_performance_metrics(self):
1919

2020
def _fill_command_line(self):
2121
path_to_onnx_script = Path.joinpath(self.inference_script_root, 'inference_onnx_runtime.py')
22-
python = ProcessHandler.get_cmd_python_version()
22+
python = ProcessHandler.get_cmd_python_version(self._test)
2323

2424
model = self._test.model.model
2525
dataset = self._test.dataset.path if self._test.dataset else None

src/benchmark/frameworks/opencv_dnn_python/opencv_dnn_python_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def get_performance_metrics(self):
1919

2020
def _fill_command_line(self):
2121
path_to_opencv_script = Path.joinpath(self.inference_script_root, 'inference_opencv.py')
22-
python = ProcessHandler.get_cmd_python_version()
22+
python = ProcessHandler.get_cmd_python_version(self._test)
2323

2424
model = self._test.model.model
2525
weights = self._test.model.weight

src/benchmark/frameworks/openvino/openvino_python_api_process.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def get_performance_metrics(self):
5454

5555
def _fill_command_line(self):
5656
path_to_async_script = Path.joinpath(self.inference_script_root, 'inference_openvino_async_mode.py')
57-
python = ProcessHandler.get_cmd_python_version()
57+
python = ProcessHandler.get_cmd_python_version(self._test)
5858

5959
common_params = super()._fill_command_line()
6060
command_line = f'{python} {path_to_async_script} {common_params}'
@@ -82,7 +82,7 @@ def get_performance_metrics(self):
8282

8383
def _fill_command_line(self):
8484
path_to_sync_script = Path.joinpath(self.inference_script_root, 'inference_openvino_sync_mode.py')
85-
python = ProcessHandler.get_cmd_python_version()
85+
python = ProcessHandler.get_cmd_python_version(self._test)
8686
time_limit = self._test.indep_parameters.test_time_limit
8787

8888
common_params = super()._fill_command_line()

0 commit comments

Comments
 (0)