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

Download----fix new bug #8088

Merged
merged 7 commits into from
Mar 12, 2024
Merged

Conversation

LOVE-YOURSELF-1
Copy link
Contributor

PR types

Bug fixes

PR changes

修改模型默认下载优先级、修复cache加载文件时的bug、增加对下载文件是否为None的检查

Description

修复新的Download逻辑中测试所发现的新bug

Copy link

paddle-bot bot commented Mar 11, 2024

Thanks for your contribution!

if cache_file_name is not None and not isinstance(cache_file_name, object):
return cache_file_name
if cache_file_name is not None:
if ((from_aistudio or from_hf_hub) and not isinstance(cache_file_name, object)) or from_bos:
Copy link
Member

Choose a reason for hiding this comment

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

没这么复杂吧

Copy link
Member

@JunnYu JunnYu Mar 11, 2024

Choose a reason for hiding this comment

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

if from_hf_hub and cache_file_name is _CACHED_NO_EXIST:
    cache_file_name = None
if cache_file_name is not None:
     xxxxxxxxxxx

@JunnYu JunnYu self-requested a review March 11, 2024 09:02
JunnYu
JunnYu previously approved these changes Mar 11, 2024
Copy link
Member

@JunnYu JunnYu left a comment

Choose a reason for hiding this comment

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

LGTM

JunnYu
JunnYu previously approved these changes Mar 12, 2024
Copy link
Member

@JunnYu JunnYu 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

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 85.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 56.46%. Comparing base (557c794) to head (68e373c).
Report is 3 commits behind head on develop.

Files Patch % Lines
paddlenlp/transformers/auto/image_processing.py 0.00% 1 Missing ⚠️
paddlenlp/transformers/auto/processing.py 0.00% 1 Missing ⚠️
paddlenlp/utils/download/aistudio_hub_download.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8088      +/-   ##
===========================================
- Coverage    56.46%   56.46%   -0.01%     
===========================================
  Files          596      596              
  Lines        91564    91576      +12     
===========================================
+ Hits         51704    51708       +4     
- Misses       39860    39868       +8     

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

Copy link
Member

@JunnYu JunnYu left a comment

Choose a reason for hiding this comment

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

LGTM

@JunnYu JunnYu merged commit 646a429 into PaddlePaddle:develop Mar 12, 2024
8 of 10 checks passed
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.

3 participants