mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 12:10:09 +01:00
ok Merge branch 'master' of https://github.com/modelscope/modelscope into release/1.22
This commit is contained in:
@@ -1783,12 +1783,11 @@ class ModelScopeConfig:
|
||||
with open(cookies_path, 'rb') as f:
|
||||
cookies = pickle.load(f)
|
||||
for cookie in cookies:
|
||||
if cookie.is_expired() and not ModelScopeConfig.cookie_expired_warning:
|
||||
if cookie.name == 'm_session_id' and cookie.is_expired() and \
|
||||
not ModelScopeConfig.cookie_expired_warning:
|
||||
ModelScopeConfig.cookie_expired_warning = True
|
||||
logger.debug(
|
||||
'Authentication has expired, '
|
||||
'please re-login with modelscope login --token "YOUR_SDK_TOKEN" '
|
||||
'if you need to access private models or datasets.')
|
||||
logger.warning('Authentication has expired, '
|
||||
'please re-login for uploading or accessing controlled entities.')
|
||||
return None
|
||||
return cookies
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user