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

[Fnet P0]add PretrainedConfig and unit test #5780

Merged
merged 8 commits into from
May 5, 2023

Conversation

ZwhElliott
Copy link
Contributor

PR types

PR changes

Description

@paddle-bot
Copy link

paddle-bot bot commented Apr 25, 2023

Thanks for your contribution!

@sijunhe
Copy link
Collaborator

sijunhe commented Apr 26, 2023

感谢贡献!我们目前ci有些小问题,正在修

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.

麻烦merge一下develop, ci应该ok了

@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #5780 (b5434fe) into develop (08dd8ee) will increase coverage by 0.39%.
The diff coverage is 98.31%.

@@             Coverage Diff             @@
##           develop    #5780      +/-   ##
===========================================
+ Coverage    61.44%   61.84%   +0.39%     
===========================================
  Files          489      490       +1     
  Lines        69028    68984      -44     
===========================================
+ Hits         42417    42664     +247     
+ Misses       26611    26320     -291     
Impacted Files Coverage Δ
paddlenlp/transformers/fnet/modeling.py 92.58% <97.80%> (+65.71%) ⬆️
paddlenlp/transformers/__init__.py 100.00% <100.00%> (ø)
paddlenlp/transformers/fnet/configuration.py 100.00% <100.00%> (ø)
paddlenlp/transformers/fnet/tokenizer.py 93.33% <100.00%> (+57.12%) ⬆️

@ZwhElliott
Copy link
Contributor Author

似乎还是有些问题

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.

多谢贡献~ 几个小问题

from .configuration import (
FNET_PRETRAINED_INIT_CONFIGURATION,
FNET_PRETRAINED_RESOURCE_FILES_MAP,
FnetConfig,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
FnetConfig,
FNetConfig,

}


class FnetConfig(PretrainedConfig):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
class FnetConfig(PretrainedConfig):
class FNetConfig(PretrainedConfig):

@@ -1046,7 +922,8 @@ def forward(
)
sequence_output = outputs[0] if not return_dict else outputs["last_hidden_state"]
logits = self.qa_outputs(sequence_output)
start_logits, end_logits = paddle.split(logits, num_or_sections=1, axis=-1)
print(logits.shape)
Copy link
Collaborator

Choose a reason for hiding this comment

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

多余的print麻烦删掉~

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

@sijunhe sijunhe merged commit 9a8769e into PaddlePaddle:develop May 5, 2023
6 of 9 checks passed
@ZwhElliott
Copy link
Contributor Author

ZwhElliott commented May 5, 2023 via email

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