-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ConvBert P0 P1 P2] Add PretrainedConfig, unit tests and input_embs #5886
Conversation
Thanks for your contribution! |
Codecov Report
@@ Coverage Diff @@
## develop #5886 +/- ##
===========================================
+ Coverage 61.94% 62.36% +0.42%
===========================================
Files 491 491
Lines 69136 69245 +109
===========================================
+ Hits 42824 43188 +364
+ Misses 26312 26057 -255
|
Examples: | ||
|
||
```python | ||
>>> from paddlenlp.transformers import BertModel, BertConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的示例可以修改成convbert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
@@ -0,0 +1,307 @@ | |||
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的年份可以统一改下,下同
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
完成得挺好的,小地方修一下就好
from .modeling import * | ||
from .tokenizer import * | ||
# from .modeling import * | ||
# from .tokenizer import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接删除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
See :class:`ConvBertModel`. | ||
output_hidden_states (bool, optional): | ||
Whether to return the hidden states of all layers. | ||
Defaults to `False`. | ||
output_attentions (bool, optional): | ||
Whether to return the attentions tensors of all attention layers. | ||
Defaults to `False`. | ||
return_dict (bool, optional): | ||
Whether to return a :class:`~paddlenlp.transformers.model_outputs.QuestionAnsweringModelOutput` object. If | ||
`False`, the output will be a tuple of tensors. Defaults to `False`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些应该也相应得补到ConvBertModel的注释里去
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已添加,此处均改为 “See :class:ConvBertModel
.”
|
||
|
||
@parameterized_class( | ||
("return_dict", "use_labels", "use_inputs_embeds"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use_inputs_embeds 可以从parameterized里去了,在class定义里面直接打开use_inputs_embeds=True就好了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已删去,设置 use_test_inputs_embeds: bool = True。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job. LGTM
PR types
PR changes
Description