From 0886a4b810fad219056bbbcf4bd65a9ff7e49076 Mon Sep 17 00:00:00 2001 From: nju-xy <1582857295@qq.com> Date: Mon, 11 Dec 2023 18:52:23 +0800 Subject: [PATCH] [MNT] update text example: gen_semantic_spec --- examples/dataset_text_workflow/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/dataset_text_workflow/main.py b/examples/dataset_text_workflow/main.py index aa218ec..5b4dc82 100644 --- a/examples/dataset_text_workflow/main.py +++ b/examples/dataset_text_workflow/main.py @@ -16,6 +16,7 @@ from learnware.reuse import JobSelectorReuser, AveragingReuser, EnsemblePruningR from utils import generate_uploader, generate_user, TextDataLoader, train, eval_prediction from learnware.client import LearnwareClient, SemanticSpecificationKey import matplotlib.pyplot as plt +from learnware.specification import generate_semantic_spec # Login to Beiming system client = LearnwareClient() @@ -55,7 +56,8 @@ output_description = { "14": "14", "15": "15", "16": "16", "17": "17", "18": "18", "19": "19"} } -semantic_spec = client.create_semantic_specification( + +semantic_spec = generate_semantic_spec( name="learnware_example", description="Just a example for text learnware", data_type="Text", @@ -67,7 +69,7 @@ semantic_spec = client.create_semantic_specification( output_description=output_description, ) -user_semantic = client.create_semantic_specification( +user_semantic = generate_semantic_spec( # name="learnware_example", description="Just a example for text learnware", data_type="Text",