From 2e4f57332f0ef9d3ac6ba3c5187e525021d9d20f Mon Sep 17 00:00:00 2001 From: jade Date: Tue, 28 Feb 2023 10:17:21 +0800 Subject: [PATCH] =?UTF-8?q?*=20log=E6=A8=A1=E5=9D=97info=E4=B8=8D=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- acllite/acllite_logger.py | 2 +- acllite/acllite_model.py | 12 ++++++------ acllite/acllite_resource.py | 14 +++++++------- setup.py | 2 +- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 16c4e6bc3..4a969728d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -## Acllite v1.0.5 +## Acllite v1.0.6 ### 更新日志 +* log模块info不输出 * 注释打开Rtsp视频流的输出 * 注释Decode channel %d frame %d failed输出 * 注释掉部分输出 diff --git a/acllite/acllite_logger.py b/acllite/acllite_logger.py index 2f3b79b43..a0ca48ad1 100644 --- a/acllite/acllite_logger.py +++ b/acllite/acllite_logger.py @@ -59,7 +59,7 @@ def log_info(*log_msg): """ log_str = [str(i) for i in log_msg] log_str = "".join(log_str) - print(log_str) + # print(log_str) caller_frame = sys._getframe().f_back # caller file filename = caller_frame.f_code.co_filename diff --git a/acllite/acllite_model.py b/acllite/acllite_model.py index bf607706c..b450843a7 100644 --- a/acllite/acllite_model.py +++ b/acllite/acllite_model.py @@ -46,7 +46,7 @@ def __init__(self, model_path, load_type=0): resource_list.register(self) def _init_resource(self): - log_info("Init model resource start...") + # log_info("Init model resource start...") if not os.path.isfile(self._model_path): log_error( "model_path failed, please check. model_path=%s" % @@ -83,12 +83,12 @@ def _init_resource(self): # recode input data address,if need malloc memory,the memory will be # reuseable self._init_input_buffer() - log_info("Init model resource success") + # log_info("Init model resource success") return const.SUCCESS def _gen_output_dataset(self, ouput_num): - log_info("[AclLiteModel] create model output dataset:") + # log_info("[AclLiteModel] create model output dataset:") dataset = acl.mdl.create_dataset() for i in range(ouput_num): # malloc device memory for output @@ -98,13 +98,13 @@ def _gen_output_dataset(self, ouput_num): # crate oputput data buffer dataset_buffer = acl.create_data_buffer(buf, size) _, ret = acl.mdl.add_dataset_buffer(dataset, dataset_buffer) - log_info("malloc output %d, size %d" % (i, size)) + # log_info("malloc output %d, size %d" % (i, size)) if ret: acl.rt.free(buf) acl.destroy_data_buffer(dataset_buffer) utils.check_ret("acl.destroy_data_buffer", ret) self._output_dataset = dataset - log_info("Create model output dataset success") + # log_info("Create model output dataset success") def _init_input_buffer(self): self._input_num = acl.mdl.get_num_inputs(self._model_desc) @@ -439,7 +439,7 @@ def destroy(self): self._is_destroyed = True resource_list.unregister(self) - log_info("AclLiteModel release source success") + # log_info("AclLiteModel release source success") def __del__(self): self.destroy() diff --git a/acllite/acllite_resource.py b/acllite/acllite_resource.py index aa3054d92..d0f519110 100644 --- a/acllite/acllite_resource.py +++ b/acllite/acllite_resource.py @@ -75,7 +75,7 @@ def init(self): """ init resource """ - print("init resource stage:") + # print("init resource stage:") ret = acl.init() utils.check_ret("acl.init", ret) @@ -91,20 +91,20 @@ def init(self): self.run_mode, ret = acl.rt.get_run_mode() utils.check_ret("acl.rt.get_run_mode", ret) - print("Init resource success") + # print("Init resource success") def __del__(self): - print("acl resource release all resource") + # print("acl resource release all resource") resource_list.destroy() if self.stream: - print("acl resource release stream") + # print("acl resource release stream") acl.rt.destroy_stream(self.stream) if self.context: - print("acl resource release context") + # print("acl resource release context") acl.rt.destroy_context(self.context) - print("Reset acl device ", self.device_id) + # print("Reset acl device ", self.device_id) acl.rt.reset_device(self.device_id) acl.finalize() - print("Release acl resource success") + # print("Release acl resource success") diff --git a/setup.py b/setup.py index a31d17353..756152d45 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ def find_packages(path,pack_list): find_packages("acllite",pack_list) setup( name="acllite", - version="1.0.5", + version="1.0.6", keywords=("pip", "acllite", ""), description="acllite", long_description=long_description,