Skip to content

Conversation

@sijunhe
Copy link
Contributor

@sijunhe sijunhe commented Dec 28, 2022

PR types

PR changes

Description

Previously, all the warnings were triggered by hasattr, which calls __get_attr__ underneath and triggered all the warning. Changing everything to access from config now.

Also remove the get from config branch of get_attr of Bart/MBart/CodeGen/Unimo/Unified Transformers

Tested that all the warnings go away after this PR

@sijunhe sijunhe requested a review from wj-Mcat December 28, 2022 08:05
@paddle-bot
Copy link

paddle-bot bot commented Dec 28, 2022

Thanks for your contribution!

@codecov
Copy link

codecov bot commented Dec 28, 2022

Codecov Report

Merging #4264 (75ae457) into develop (699a2f0) will decrease coverage by 0.04%.
The diff coverage is 97.05%.

@@             Coverage Diff             @@
##           develop    #4264      +/-   ##
===========================================
- Coverage    36.39%   36.35%   -0.05%     
===========================================
  Files          419      419              
  Lines        59058    59165     +107     
===========================================
+ Hits         21495    21509      +14     
- Misses       37563    37656      +93     
Impacted Files Coverage Δ
paddlenlp/transformers/ernie_m/modeling.py 90.65% <ø> (ø)
paddlenlp/transformers/configuration_utils.py 67.93% <75.00%> (+0.07%) ⬆️
paddlenlp/transformers/bart/modeling.py 85.30% <100.00%> (-0.14%) ⬇️
paddlenlp/transformers/bert/configuration.py 100.00% <100.00%> (ø)
paddlenlp/transformers/bert/modeling.py 89.15% <100.00%> (+0.03%) ⬆️
paddlenlp/transformers/codegen/modeling.py 89.03% <100.00%> (-0.11%) ⬇️
paddlenlp/transformers/ernie/configuration.py 100.00% <100.00%> (ø)
paddlenlp/transformers/ernie/modeling.py 92.30% <100.00%> (+0.02%) ⬆️
...ddlenlp/transformers/ernie_layout/configuration.py 100.00% <100.00%> (ø)
paddlenlp/transformers/ernie_layout/modeling.py 76.92% <100.00%> (+0.04%) ⬆️
... and 13 more

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

Copy link
Contributor

@wj-Mcat wj-Mcat left a comment

Choose a reason for hiding this comment

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

就这里一个typo 的问题,其它 lgtm。

@wawltor wawltor merged commit 2c59e39 into PaddlePaddle:develop Dec 29, 2022
@sijunhe sijunhe deleted the attri_warning branch December 29, 2022 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants