Skip to content

Conversation

@LOVE-YOURSELF-1
Copy link
Contributor

PR types

Bug fixes

PR changes

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

Description

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

@paddle-bot
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

@codecov
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants