From 8b6c83b15adb4fa0a2f8bbb5ef02a5af64280294 Mon Sep 17 00:00:00 2001 From: Yu Fan Date: Fri, 6 Sep 2024 17:01:58 +0800 Subject: [PATCH] fix: Incorrect preloading of the HardExampleMining module. Signed-off-by: Yu Fan --- core/testcasecontroller/algorithm/module/module.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/testcasecontroller/algorithm/module/module.py b/core/testcasecontroller/algorithm/module/module.py index 6d487d97..b697f86c 100644 --- a/core/testcasecontroller/algorithm/module/module.py +++ b/core/testcasecontroller/algorithm/module/module.py @@ -110,9 +110,14 @@ def get_module_instance(self, module_type): if self.url: try: utils.load_module(self.url) - # pylint: disable=E1134 - func = ClassFactory.get_cls( - type_name=class_factory_type, t_cls_name=self.name)(**self.hyperparameters) + + if class_factory_type == ClassType.HEM: + func = {"method": self.name, "param":self.hyperparameters} + else: + func = ClassFactory.get_cls( + type_name=class_factory_type, + t_cls_name=self.name + )(**self.hyperparameters) return func except Exception as err: