PaddleNLP icon indicating copy to clipboard operation
PaddleNLP copied to clipboard

[Question]: erine-gram作为千言数据集:问题匹配鲁棒性baseline运行时无法下载paddlenlp

Open vesper1012 opened this issue 2 years ago • 10 comments

请提出你的问题

在paddle里运行2021 CCF BDCI 千言-问题匹配鲁棒性评测Baseline时, 运行至 import paddlenlp as ppnlp报错: TypeError: can't apply this setattr to type object

vesper1012 avatar Oct 31 '22 05:10 vesper1012

请详细说一下您的环境,您是使用的这里的代码吗?

https://github.com/PaddlePaddle/PaddleNLP/tree/develop/examples/text_matching/question_matching

请确保安装了paddlenlp,并升级最新版本:

pip install --upgrade paddlenlp

w5688414 avatar Oct 31 '22 10:10 w5688414

您好  我是在AIstudio平台里面运行的  https://aistudio.baidu.com/bd-gpu-01/user/2913358/4922366/notebooks/4922366.ipynb

------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleNLP" @.>; 发送时间: 2022年10月31日(星期一) 晚上6:45 @.>; @.@.>; 主题: Re: [PaddlePaddle/PaddleNLP] [Question]: erine-gram作为千言数据集:问题匹配鲁棒性baseline运行时无法下载paddlenlp (Issue #3613)

请详细说一下您的环境,您是使用的这里的代码吗?

https://github.com/PaddlePaddle/PaddleNLP/tree/develop/examples/text_matching/question_matching

请确保安装了paddlenlp,并升级最新版本: pip install --upgrade paddlenlp
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

vesper1012 avatar Oct 31 '22 10:10 vesper1012

您好 我是在AIstudio平台里面运行的 https://aistudio.baidu.com/bd-gpu-01/user/2913358/4922366/notebooks/4922366.ipynb paddlenlp已经安装好了

运行报错: ---------------------------------------------------------------------------TypeError Traceback (most recent call last)/tmp/ipykernel_145/2093448463.py in <module> 10 import paddle.nn.functional as F 11 ---> 12 import paddlenlp as ppnlp 13 from paddlenlp.data import Stack, Tuple, Pad 14 from paddlenlp.datasets import load_dataset /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlenlp/init.py in <module> 22 "Please import paddlenlp before datasets module to avoid download issues" 23 ) ---> 24 from . import data 25 from . import datasets 26 from . import embeddings /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlenlp/data/init.py in <module> 14 15 from .collate import * ---> 16 from .data_collator import * 17 from .vocab import * 18 from .sampler import * /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlenlp/data/data_collator.py in <module> 21 import warnings 22 from dataclasses import dataclass ---> 23 from ..transformers.tokenizer_utils_base import BatchEncoding, PretrainedTokenizerBase, PaddingStrategy 24 25 all = [ /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlenlp/transformers/init.py in <module> 13 # limitations under the License. 14 ---> 15 from .model_utils import PretrainedModel, register_base_model 16 from .tokenizer_utils import PretrainedTokenizer, BPETokenizer, tokenize_chinese_chars, is_chinese_char, AddedToken, normalize_chars, tokenize_special_chars, convert_to_unicode 17 from .processing_utils import ProcessorMixin /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlenlp/transformers/model_utils.py in <module> 76 77 @six.add_metaclass(InitTrackerMeta) ---> 78 class PretrainedModel(Layer, GenerationMixin): 79 """ 80 The base class for all pretrained models. It mainly provides common methods /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/six.py in wrapper(cls) 892 if hasattr(cls, 'qualname'): 893 orig_vars['qualname'] = cls.qualname --> 894 return metaclass(cls.name, cls.bases, orig_vars) 895 return wrapper 896 /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlenlp/transformers/utils.py in init(cls, name, bases, attrs) 130 None) if 'init' in attrs else None 131 cls.init = InitTrackerMeta.init_and_track_conf( --> 132 init_func, pre_init_func, post_init_func) 133 super(InitTrackerMeta, cls).init(name, bases, attrs) 134 /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlenlp/transformers/utils.py in setattr(self, name, value) 170 def setattr(self, name, value): 171 value = adapt_stale_fwd_patch(self, name, value) --> 172 return super(InitTrackerMeta, self).setattr(name, value) TypeError: can't apply this setattr to type object

------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleNLP" @.>; 发送时间: 2022年10月31日(星期一) 晚上6:45 @.>; @.@.>; 主题: Re: [PaddlePaddle/PaddleNLP] [Question]: erine-gram作为千言数据集:问题匹配鲁棒性baseline运行时无法下载paddlenlp (Issue #3613)

请详细说一下您的环境,您是使用的这里的代码吗?

https://github.com/PaddlePaddle/PaddleNLP/tree/develop/examples/text_matching/question_matching

请确保安装了paddlenlp,并升级最新版本: pip install --upgrade paddlenlp
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

vesper1012 avatar Oct 31 '22 10:10 vesper1012

@vesper1012 Hi,请把项目分享一下,这个链接我打不开

w5688414 avatar Oct 31 '22 11:10 w5688414

您好: 项目地址是这个 不知道您是否可以打开: https://aistudio.baidu.com/aistudio/projectdetail/4922366?forkThirdPart=1

Vesper @.***

 

------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleNLP" @.>; 发送时间: 2022年10月31日(星期一) 晚上7:58 @.>; @.@.>; 主题: Re: [PaddlePaddle/PaddleNLP] [Question]: erine-gram作为千言数据集:问题匹配鲁棒性baseline运行时无法下载paddlenlp (Issue #3613)

@vesper1012 Hi,请把项目分享一下,这个链接我打不开

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

vesper1012 avatar Oct 31 '22 11:10 vesper1012

是这个比赛的baseline: https://aistudio.baidu.com/aistudio/competition/detail/130/0/introduction 我点击直接在aistudio里面运行, 进入以后环境正常但是会出现上述报错

Vesper @.***

 

------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleNLP" @.>; 发送时间: 2022年10月31日(星期一) 晚上7:58 @.>; @.@.>; 主题: Re: [PaddlePaddle/PaddleNLP] [Question]: erine-gram作为千言数据集:问题匹配鲁棒性baseline运行时无法下载paddlenlp (Issue #3613)

@vesper1012 Hi,请把项目分享一下,这个链接我打不开

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

vesper1012 avatar Oct 31 '22 12:10 vesper1012

@vesper1012 Hi, 升级Paddle版本就能解决这个问题。我重新发布了一个升级成2.4版本的项目,请参考。

https://aistudio.baidu.com/aistudio/projectdetail/4942734

w5688414 avatar Nov 01 '22 06:11 w5688414

您好: 收到 可以run成功了 感谢回复~

Vesper @.***

 

------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleNLP" @.>; 发送时间: 2022年11月1日(星期二) 下午2:24 @.>; @.@.>; 主题: Re: [PaddlePaddle/PaddleNLP] [Question]: erine-gram作为千言数据集:问题匹配鲁棒性baseline运行时无法下载paddlenlp (Issue #3613)

@vesper1012 Hi, 升级Paddle版本就能解决这个问题。我重新发布了一个升级成2.4版本的项目,请参考。

https://aistudio.baidu.com/aistudio/projectdetail/4942734

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

vesper1012 avatar Nov 02 '22 03:11 vesper1012

您好: 请问百度的分词工具LAC中有一个model是rank, 用于词重要程度排序, 请问方便提供这个工具的开源代码吗, GitHub上仅有API的调用方式, 没有详细介绍每个词的重要性是如何算的.

Vesper @.***

 

------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleNLP" @.>; 发送时间: 2022年11月1日(星期二) 下午2:24 @.>; @.@.>; 主题: Re: [PaddlePaddle/PaddleNLP] [Question]: erine-gram作为千言数据集:问题匹配鲁棒性baseline运行时无法下载paddlenlp (Issue #3613)

@vesper1012 Hi, 升级Paddle版本就能解决这个问题。我重新发布了一个升级成2.4版本的项目,请参考。

https://aistudio.baidu.com/aistudio/projectdetail/4942734

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

vesper1012 avatar Nov 08 '22 15:11 vesper1012

Hi, @vesper1012 , LAC的问题建议重新提一个issue,会有专门的人解答

w5688414 avatar Nov 09 '22 02:11 w5688414

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] avatar Jan 08 '23 15:01 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。

github-actions[bot] avatar Jan 23 '23 00:01 github-actions[bot]