diff --git a/debug/accuracy_tools/api_accuracy_checker/common/config.py b/debug/accuracy_tools/api_accuracy_checker/common/config.py index 07dd4e6bfca90336b4d9c3c4f1deaed9aded17b6..550513d8e34ba898487680e7428878ae06b65f76 100644 --- a/debug/accuracy_tools/api_accuracy_checker/common/config.py +++ b/debug/accuracy_tools/api_accuracy_checker/common/config.py @@ -17,7 +17,6 @@ class Config: 'compare_algorithm': str, 'real_data': bool, 'dump_step': int, - 'error_data_path': str, 'enable_dataloader': bool, 'target_iter': int } diff --git a/debug/accuracy_tools/api_accuracy_checker/config.yaml b/debug/accuracy_tools/api_accuracy_checker/config.yaml index 46f0ed8d41af82c43154263d940678321f57b814..771e4a897e1c35816a71c816e90c7b912720b24b 100644 --- a/debug/accuracy_tools/api_accuracy_checker/config.yaml +++ b/debug/accuracy_tools/api_accuracy_checker/config.yaml @@ -4,6 +4,5 @@ compile_option: -O3 compare_algorithm: cosine_similarity real_data: False dump_step: 1000 -error_data_path: './' enable_dataloader: True target_iter: 1 \ No newline at end of file diff --git a/debug/accuracy_tools/api_accuracy_checker/run_ut/run_ut.py b/debug/accuracy_tools/api_accuracy_checker/run_ut/run_ut.py index 26c2f1c46018ce1f4c3069910e46af22138d3c06..f57c5d43e59d45b0e50cd285db6276042023096a 100644 --- a/debug/accuracy_tools/api_accuracy_checker/run_ut/run_ut.py +++ b/debug/accuracy_tools/api_accuracy_checker/run_ut/run_ut.py @@ -201,8 +201,8 @@ def run_backward(api_full_name, args, backward_content, grad_index, npu_args, np return grad_out, npu_grad_out, grad, npu_grad -def initialize_save_error_data(): - error_data_path = os.path.realpath(msCheckerConfig.error_data_path) +def initialize_save_error_data(out_path): + error_data_path = os.path.realpath(out_path) check_file_or_directory_path(error_data_path, True) initialize_save_path(error_data_path, 'ut_error_data') @@ -245,7 +245,7 @@ def _run_ut(): out_path = os.path.realpath(args.out_path) if args.out_path else "./" save_error_data = args.save_error_data if save_error_data: - initialize_save_error_data() + initialize_save_error_data(out_path) run_ut(forward_file, backward_file, out_path, save_error_data) diff --git a/debug/accuracy_tools/api_accuracy_checker/run_ut/ut_api_info.py b/debug/accuracy_tools/api_accuracy_checker/run_ut/ut_api_info.py index d2a29a0f70d6dc4c6bb73ee6c808694be977d40a..f4b7f5de317f187121d6fe837d89e7f91157c085 100644 --- a/debug/accuracy_tools/api_accuracy_checker/run_ut/ut_api_info.py +++ b/debug/accuracy_tools/api_accuracy_checker/run_ut/ut_api_info.py @@ -1,9 +1,8 @@ -from api_accuracy_checker.common.config import msCheckerConfig from api_accuracy_checker.common.base_api import BaseAPIInfo class UtAPIInfo(BaseAPIInfo): - def __init__(self, api_name, element, is_forward=True, is_save_data=True, save_path=msCheckerConfig.error_data_path, + def __init__(self, api_name, element, is_forward=True, is_save_data=True, save_path='./', forward_path='ut_error_data', backward_path='ut_error_data'): super().__init__(api_name, is_forward, is_save_data, save_path, forward_path, backward_path) self.analyze_element(element)