Skip to content

Commit 84a6946

Browse files
Fix docstring format (#761)
Signed-off-by: Lv, Liang1 <[email protected]> Co-authored-by: chen, suyue <[email protected]>
1 parent 58c4b87 commit 84a6946

File tree

1 file changed

+29
-24
lines changed

1 file changed

+29
-24
lines changed

neural_compressor/config.py

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -153,20 +153,20 @@ class BenchmarkConfig:
153153
"""Config Class for Benchmark.
154154
155155
Args:
156-
inputs (List, optional): A list of strings containing the inputs of model. Default is an empty list.
157-
outputs (List, optional): A list of strings containing the outputs of model. Default is an empty list.
158-
backend (str, optional): backend name for model execution. Supported values include: 'default', 'itex',
159-
'ipex', 'onnxrt_trt_ep', 'onnxrt_cuda_ep'. Default value is 'default'.
160-
warmup (int, optional): The number of iterations to perform warmup before running performance tests.
161-
Default value is 5.
162-
iteration (int, optional): The number of iterations to run performance tests. Default is -1.
163-
cores_per_instance (int, optional): The number of CPU cores to use per instance. Default value is None.
164-
num_of_instance (int, optional): The number of instances to use for performance testing.
165-
Default value is None.
166-
inter_num_of_threads (int, optional): The number of threads to use for inter-thread operations.
167-
Default value is None.
168-
intra_num_of_threads (int, optional): The number of threads to use for intra-thread operations.
169-
Default value is None.
156+
inputs (list, optional): A list of strings containing the inputs of model. Default is an empty list.
157+
outputs (list, optional): A list of strings containing the outputs of model. Default is an empty list.
158+
backend (str, optional): Backend name for model execution. Supported values include: 'default', 'itex',
159+
'ipex', 'onnxrt_trt_ep', 'onnxrt_cuda_ep'. Default value is 'default'.
160+
warmup (int, optional): The number of iterations to perform warmup before running performance tests.
161+
Default value is 5.
162+
iteration (int, optional): The number of iterations to run performance tests. Default is -1.
163+
cores_per_instance (int, optional): The number of CPU cores to use per instance. Default value is None.
164+
num_of_instance (int, optional): The number of instances to use for performance testing.
165+
Default value is None.
166+
inter_num_of_threads (int, optional): The number of threads to use for inter-thread operations.
167+
Default value is None.
168+
intra_num_of_threads (int, optional): The number of threads to use for intra-thread operations.
169+
Default value is None.
170170
171171
Example::
172172
@@ -1218,14 +1218,19 @@ class MixedPrecisionConfig(PostTrainingQuantConfig):
12181218
"""Config Class for MixedPrecision.
12191219
12201220
Args:
1221-
device (String, optional): device for execution. Support 'cpu' and 'gpu', default is 'cpu'
1222-
backend (String, optional): backend for model execution. Support 'default', 'itex', 'ipex', 'onnxrt_trt_ep', 'onnxrt_cuda_ep', default is 'default'
1223-
precision (String, optional): target precision for mix precision conversion. Support 'bf16' and 'fp16', default is 'bf16'
1224-
inputs (List, optional): inputs of model, default is []
1225-
outputs (List, optional): outputs of model, default is []
1226-
tuning_criterion (TuningCriterion object, optional): accuracy tuning settings, it won't work if there is no accuracy tuning process
1227-
accuracy_criterion (AccuracyCriterion object, optional): accuracy constraint settings, it won't work if there is no accuracy tuning process
1228-
excluded_precisions (List, optional): precisions to be excluded during mix precision conversion, default is []
1221+
device (str, optional): device for execution. Support 'cpu' and 'gpu', default is 'cpu'
1222+
backend (str, optional): backend for model execution. Support 'default', 'itex', 'ipex',
1223+
'onnxrt_trt_ep', 'onnxrt_cuda_ep', default is 'default'
1224+
precision (str, optional): target precision for mix precision conversion.
1225+
Support 'bf16' and 'fp16', default is 'bf16'
1226+
inputs (list, optional): inputs of model, default is []
1227+
outputs (list, optional): outputs of model, default is []
1228+
tuning_criterion (TuningCriterion object, optional): accuracy tuning settings, it won't work
1229+
if there is no accuracy tuning process
1230+
accuracy_criterion (AccuracyCriterion object, optional): accuracy constraint settings, it won't
1231+
work if there is no accuracy tuning process
1232+
excluded_precisions (list, optional): precisions to be excluded during mix precision conversion,
1233+
default is []
12291234
12301235
Example::
12311236
@@ -1411,10 +1416,10 @@ class TF2ONNXConfig(ExportConfig):
14111416
14121417
Args:
14131418
dtype (str, optional): The data type of export target model. Supports 'fp32' and 'int8'.
1414-
Defaults to "int8".
1419+
Defaults to 'int8'.
14151420
opset_version (int, optional): The version of the ONNX operator set to use. Defaults to 14.
14161421
quant_format (str, optional): The quantization format for the export target model.
1417-
Supports 'default', 'QDQ' and 'QOperator'. Defaults to "QDQ".
1422+
Supports 'default', 'QDQ' and 'QOperator'. Defaults to 'QDQ'.
14181423
example_inputs (list, optional): A list example inputs to use for tracing the model.
14191424
Defaults to None.
14201425
input_names (list, optional): A list of model input names. Defaults to None.

0 commit comments

Comments
 (0)