From dedd03a60d7b85dbfc5b7bee42a622ac840a8618 Mon Sep 17 00:00:00 2001 From: Gene Date: Sat, 18 Nov 2023 15:12:32 +0800 Subject: [PATCH] [FIX] fix bugs in is_hetero --- learnware/market/heterogeneous/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learnware/market/heterogeneous/utils.py b/learnware/market/heterogeneous/utils.py index ea081b7..1be7ba6 100644 --- a/learnware/market/heterogeneous/utils.py +++ b/learnware/market/heterogeneous/utils.py @@ -21,7 +21,7 @@ def is_hetero(stat_specs: dict, semantic_spec: dict) -> bool: table_input_shape = table_stat_spec.get_z().shape[1] semantic_task_type = semantic_spec["Task"]["Values"] - if len(semantic_task_type) == 0 or semantic_task_type not in [["Classification"], ["Regression"]]: + if len(semantic_task_type) > 0 and semantic_task_type not in [["Classification"], ["Regression"]]: logger.warning("User doesn't provide correct task type, it must be either Classification or Regression.") return False