From c0e4405cd359f2f56df03fdbe2191ec44904b54e Mon Sep 17 00:00:00 2001 From: yonggie <1156910334@qq.com> Date: Mon, 1 May 2023 00:04:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=AD=A3pipline=E5=88=B0pipeline?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=AD=A3example=EF=BC=8C=E5=8E=9Fexample?= =?UTF-8?q?=E6=9C=89typo=EF=BC=8C=E8=B7=91=E4=B8=8D=E9=80=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Erlangshen-Ubert-330M-Chinese.md" | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git "a/source/docs/\344\272\214\351\203\216\347\245\236\347\263\273\345\210\227/Erlangshen-Ubert-330M-Chinese.md" "b/source/docs/\344\272\214\351\203\216\347\245\236\347\263\273\345\210\227/Erlangshen-Ubert-330M-Chinese.md" index 92fe2b5..34f60a0 100644 --- "a/source/docs/\344\272\214\351\203\216\347\245\236\347\263\273\345\210\227/Erlangshen-Ubert-330M-Chinese.md" +++ "b/source/docs/\344\272\214\351\203\216\347\245\236\347\263\273\345\210\227/Erlangshen-Ubert-330M-Chinese.md" @@ -49,10 +49,10 @@ Run the code ```python import argparse -from fengshen import UbertPiplines +from fengshen import UbertPipelines total_parser = argparse.ArgumentParser("TASK NAME") -total_parser = UbertPiplines.piplines_args(total_parser) +total_parser = UbertPipelines.pipelines_args(total_parser) args = total_parser.parse_args() args.pretrained_model_path = "IDEA-CCNL/Erlangshen-Ubert-330M-Chinese" @@ -69,7 +69,7 @@ test_data=[ "id": 0} ] -model = UbertPiplines(args) +model = UbertPipelines(args) result = model.predict(test_data) for line in result: print(line) @@ -101,7 +101,7 @@ for line in result: ## 数据预处理示例 -整个模型的 Piplines 我们已经写好,所以为了方便,我们定义了数据格式。目前我们在预训练中主要含有一下几种任务类型 +整个模型的 Pipelines 我们已经写好,所以为了方便,我们定义了数据格式。目前我们在预训练中主要含有一下几种任务类型 | task_type | subtask_type | |:---------:|:--------------:| From e1f9b188ada78af72a868adbdb41ef97b540aca5 Mon Sep 17 00:00:00 2001 From: yonggie <1156910334@qq.com> Date: Mon, 1 May 2023 14:36:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9example=20typo=EF=BC=8C?= =?UTF-8?q?=E5=90=A6=E5=88=99=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Erlangshen-Ubert-110M-Chinese.md" | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git "a/source/docs/\344\272\214\351\203\216\347\245\236\347\263\273\345\210\227/Erlangshen-Ubert-110M-Chinese.md" "b/source/docs/\344\272\214\351\203\216\347\245\236\347\263\273\345\210\227/Erlangshen-Ubert-110M-Chinese.md" index bc6d82e..731f8bb 100644 --- "a/source/docs/\344\272\214\351\203\216\347\245\236\347\263\273\345\210\227/Erlangshen-Ubert-110M-Chinese.md" +++ "b/source/docs/\344\272\214\351\203\216\347\245\236\347\263\273\345\210\227/Erlangshen-Ubert-110M-Chinese.md" @@ -49,10 +49,10 @@ pip install --editable ./ 一键运行下面代码得到预测结果, 你可以任意修改示例 text 和要抽取的 entity_type,体验一下 Zero-Shot 性能 ```python import argparse -from fengshen import UbertPiplines +from fengshen import UbertPipelines total_parser = argparse.ArgumentParser("TASK NAME") -total_parser = UbertPiplines.piplines_args(total_parser) +total_parser = UbertPipelines.pipelines_args(total_parser) args = total_parser.parse_args() args.pretrained_model_path = 'IDEA-CCNL/Erlangshen-Ubert-110M-Chinese' #预训练模型路径 test_data=[ @@ -67,7 +67,7 @@ test_data=[ "id": 0} ] -model = UbertPiplines(args) +model = UbertPipelines(args) result = model.predict(test_data) for line in result: print(line) @@ -99,7 +99,7 @@ for line in result: ### 数据预处理示例 -整个模型的 Piplines 我们已经写好,所以为了方便,我们定义了数据格式。目前我们在预训练中主要含有一下几种任务类型 +整个模型的 Pipelines 我们已经写好,所以为了方便,我们定义了数据格式。目前我们在预训练中主要含有一下几种任务类型 | task_type | subtask_type | |:---------:|:--------------:|