From 6a3eb13f8bded6d87f297f8f5bb38437174909c5 Mon Sep 17 00:00:00 2001 From: ljz <470699397@qq.com> Date: Mon, 5 Jan 2026 18:51:27 +0800 Subject: [PATCH 1/2] paddlesize --- tester/api_config/config_analyzer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tester/api_config/config_analyzer.py b/tester/api_config/config_analyzer.py index 0b83fec9..fc9bc70c 100644 --- a/tester/api_config/config_analyzer.py +++ b/tester/api_config/config_analyzer.py @@ -2809,6 +2809,12 @@ def __init__(self, config): self.config = config self.args = [] self.kwargs = collections.OrderedDict() + # 兼容 paddle.Size([...]) 格式:将其替换为 [...] + def replace_paddle_size(match): + shape_list = match.group(1) # 提取 [...] 部分 + return shape_list + + config = re.sub(r"paddle\.Size\(\s*(\[[^\]]*\])\s*\)", replace_paddle_size, config) config = config.replace("Tensor(", "TensorConfig(") self.api_name, offset = self.get_api(config) From 872d1af4519d6005b896c8100b420edbcdd3c72d Mon Sep 17 00:00:00 2001 From: ljz <470699397@qq.com> Date: Mon, 5 Jan 2026 18:52:41 +0800 Subject: [PATCH 2/2] fmt --- tester/api_config/config_analyzer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tester/api_config/config_analyzer.py b/tester/api_config/config_analyzer.py index fc9bc70c..2cc2a2f4 100644 --- a/tester/api_config/config_analyzer.py +++ b/tester/api_config/config_analyzer.py @@ -2809,11 +2809,12 @@ def __init__(self, config): self.config = config self.args = [] self.kwargs = collections.OrderedDict() + # 兼容 paddle.Size([...]) 格式:将其替换为 [...] def replace_paddle_size(match): shape_list = match.group(1) # 提取 [...] 部分 return shape_list - + config = re.sub(r"paddle\.Size\(\s*(\[[^\]]*\])\s*\)", replace_paddle_size, config) config = config.replace("Tensor(", "TensorConfig(")