From d80ac2fd2df4e7fb8a28acfa512bb11472b5cc99 Mon Sep 17 00:00:00 2001
From: liugz18 <57401541+liugz18@users.noreply.github.com>
Date: 星期四, 18 七月 2024 21:34:55 +0800
Subject: [PATCH] Rename 'res' in line 514 to avoid with naming conflict with line 365
---
funasr/bin/export.py | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/funasr/bin/export.py b/funasr/bin/export.py
index cb160e9..9d01401 100644
--- a/funasr/bin/export.py
+++ b/funasr/bin/export.py
@@ -15,28 +15,28 @@
return {k: to_plain_list(v) for k, v in cfg_item.items()}
else:
return cfg_item
-
- kwargs = to_plain_list(cfg)
- log_level = getattr(logging, kwargs.get("log_level", "INFO").upper())
- logging.basicConfig(level=log_level)
+ kwargs = to_plain_list(cfg)
if kwargs.get("debug", False):
- import pdb; pdb.set_trace()
+ import pdb
+
+ pdb.set_trace()
if "device" not in kwargs:
kwargs["device"] = "cpu"
model = AutoModel(**kwargs)
-
- res = model.export(input=kwargs.get("input", None),
- type=kwargs.get("type", "onnx"),
- quantize=kwargs.get("quantize", False),
- fallback_num=kwargs.get("fallback-num", 5),
- calib_num=kwargs.get("calib_num", 100),
- opset_version=kwargs.get("opset_version", 14),
- )
+
+ res = model.export(
+ input=kwargs.get("input", None),
+ type=kwargs.get("type", "onnx"),
+ quantize=kwargs.get("quantize", False),
+ fallback_num=kwargs.get("fallback-num", 5),
+ calib_num=kwargs.get("calib_num", 100),
+ opset_version=kwargs.get("opset_version", 14),
+ )
print(res)
-if __name__ == '__main__':
- main_hydra()
\ No newline at end of file
+if __name__ == "__main__":
+ main_hydra()
--
Gitblit v1.9.1