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

[Tokenizer] Enable padding_side as call time kwargs #9161

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

lvdongyi
Copy link
Contributor

PR types

Function optimization

PR changes

APIs

Description

Enable padding_side as call time kwargs.

@CLAassistant
Copy link

CLAassistant commented Sep 20, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Project coverage is 53.26%. Comparing base (90cef20) to head (dd482da).
Report is 26 commits behind head on develop.

Files with missing lines Patch % Lines
paddlenlp/transformers/tokenizer_utils_base.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9161      +/-   ##
===========================================
- Coverage    53.26%   53.26%   -0.01%     
===========================================
  Files          652      652              
  Lines       105607   105618      +11     
===========================================
+ Hits         56254    56257       +3     
- Misses       49353    49361       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -3186,8 +3222,9 @@ def _pad(

if needs_to_be_padded:
difference = max_length - len(required_input)
padding_side = padding_side if padding_side is not None else self.padding_side
Copy link
Collaborator

Choose a reason for hiding this comment

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

最新调用方式看这里,self和传入参数二选一。

Copy link
Collaborator

Choose a reason for hiding this comment

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

@lvdongyi 非修改意见

Copy link
Collaborator

@DrownFish19 DrownFish19 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@ZHUI ZHUI left a comment

Choose a reason for hiding this comment

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

LGTM

@ZHUI ZHUI merged commit c5e6db5 into PaddlePaddle:develop Sep 24, 2024
6 of 12 checks passed
ZHUI added a commit that referenced this pull request Sep 25, 2024
ZHUI added a commit that referenced this pull request Sep 25, 2024
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.

5 participants