From 97a575d366629f9bf4d951e0f208c607bcf49129 Mon Sep 17 00:00:00 2001 From: Gene Date: Thu, 9 Nov 2023 09:55:54 +0800 Subject: [PATCH 1/2] [MNT] remove unneccssary tags --- learnware/config.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/learnware/config.py b/learnware/config.py index fb78a08..8bd557e 100644 --- a/learnware/config.py +++ b/learnware/config.py @@ -80,19 +80,13 @@ semantic_config = { "Values": [ "Classification", "Regression", - "Clustering", "Feature Extraction", - # "Generation", "Segmentation", "Object Detection", "Others", ], "Type": "Class", # Choose only one class }, - # "Device": { - # "Values": ["CPU", "GPU"], - # "Type": "Tag", - # }, # Choose one or more tags "Library": { "Values": ["Scikit-learn", "PyTorch", "TensorFlow", "Others"], "Type": "Class", From d96194fd270770a0da6678d0077069c2e690159b Mon Sep 17 00:00:00 2001 From: Gene Date: Thu, 9 Nov 2023 09:57:55 +0800 Subject: [PATCH 2/2] [MNT] remove Feature_Extraction in checker --- learnware/market/easy2/checker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/learnware/market/easy2/checker.py b/learnware/market/easy2/checker.py index 589f3e2..5e455a7 100644 --- a/learnware/market/easy2/checker.py +++ b/learnware/market/easy2/checker.py @@ -43,7 +43,7 @@ class EasySemanticChecker(BaseChecker): assert int(k) >= 0 and int(k) < dim, f"Dimension number in [0, {dim})" assert isinstance(v, str), "Description must be string" - if semantic_spec["Task"]["Values"][0] in ["Classification", "Regression", "Feature Extraction"]: + if semantic_spec["Task"]["Values"][0] in ["Classification", "Regression"]: assert semantic_spec["Output"] is not None, "Lack of output semantics" dim = semantic_spec["Output"]["Dimension"] for k, v in semantic_spec["Output"]["Description"].items(): @@ -126,7 +126,7 @@ class EasyStatChecker(BaseChecker): logger.warning(f"learnware {learnware} prediction method is not valid!") return self.INVALID_LEARNWARE - if semantic_spec["Task"]["Values"][0] in ("Classification", "Regression", "Feature Extraction"): + if semantic_spec["Task"]["Values"][0] in ("Classification", "Regression"): # Check output type if isinstance(outputs, torch.Tensor): outputs = outputs.detach().cpu().numpy()