Skip to content
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

[DalleBart P0] add PretrainedConfig and unit test #5069

Merged
merged 10 commits into from
Mar 8, 2023

Conversation

ZwhElliott
Copy link
Contributor

PR types

PR changes

Description

@paddle-bot
Copy link

paddle-bot bot commented Mar 2, 2023

Thanks for your contribution!

@ZwhElliott
Copy link
Contributor Author

github的这个自动check里面会因为无法自动下载emoji库而报错,我在本地test的时候也会这样,但是手动pip install emoji之后就可以通过了,请问这要怎么办呢。

@sijunhe
Copy link
Collaborator

sijunhe commented Mar 5, 2023

github的这个自动check里面会因为无法自动下载emoji库而报错,我在本地test的时候也会这样,但是手动pip install emoji之后就可以通过了,请问这要怎么办呢。

在requirements-dev.txt里加入依赖即可

@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Merging #5069 (020106a) into develop (eef0b28) will increase coverage by 0.45%.
The diff coverage is 97.56%.

@@             Coverage Diff             @@
##           develop    #5069      +/-   ##
===========================================
+ Coverage    50.39%   50.85%   +0.45%     
===========================================
  Files          459      460       +1     
  Lines        65585    65637      +52     
===========================================
+ Hits         33054    33381     +327     
+ Misses       32531    32256     -275     
Impacted Files Coverage Δ
paddlenlp/transformers/dallebart/modeling.py 55.01% <96.29%> (+32.85%) ⬆️
paddlenlp/transformers/__init__.py 100.00% <100.00%> (ø)
paddlenlp/transformers/dallebart/configuration.py 100.00% <100.00%> (ø)
paddlenlp/transformers/dallebart/tokenizer.py 82.53% <100.00%> (+53.89%) ⬆️
paddlenlp/transformers/clip/tokenizer.py 95.30% <0.00%> (ø)
paddlenlp/transformers/tokenizer_utils_base.py 79.47% <0.00%> (+0.19%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@sijunhe sijunhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paddle-ci过不了是我们这边的问题,可以不用管,稍微修一下下面几个小问题即可


__all__ = ["DalleBart_PRETRAINED_INIT_CONFIGURATION", "DalleBartConfig", "DalleBart_PRETRAINED_RESOURCE_FILES_MAP"]

DalleBart_PRETRAINED_RESOURCE_FILES_MAP = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all caps

}
}

DalleBart_PRETRAINED_INIT_CONFIGURATION = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all caps

@@ -199,7 +107,7 @@ def init_weights(self, layer):
layer.weight.set_value(
paddle.normal(
mean=0.0,
std=self.init_std if hasattr(self, "init_std") else self.dallebart.config["init_std"],
std=self.init_std if hasattr(self, "init_std") else self.config.init_std,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接std=self.config.init_std即可

Copy link
Collaborator

@sijunhe sijunhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加入requirements-dev.txt的依赖也增加到 https://github.com/PaddlePaddle/PaddleNLP/blob/develop/scripts/regression/requirements_ci.txt ,这样paddlenlp-ci应该就可以过了

@ZwhElliott
Copy link
Contributor Author

加入requirements-dev.txt的依赖也增加到 https://github.com/PaddlePaddle/PaddleNLP/blob/develop/scripts/regression/requirements_ci.txt ,这样paddlenlp-ci应该就可以过了

似乎还是不行 /(ㄒoㄒ)/

Copy link
Collaborator

@sijunhe sijunhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants