From ed98d18fb266acf70ba56193fc00788cd13f1210 Mon Sep 17 00:00:00 2001 From: wangxiao Date: Tue, 3 Dec 2019 12:26:33 +0800 Subject: [PATCH] update _downloader.py --- paddlepalm/_downloader.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/paddlepalm/_downloader.py b/paddlepalm/_downloader.py index 597302b..dc38a3a 100644 --- a/paddlepalm/_downloader.py +++ b/paddlepalm/_downloader.py @@ -28,7 +28,7 @@ import ssl __all__ = ["download", "ls"] # for https -ssl._create_default_https_context = ssl._create_unverified_context +# ssl._create_default_https_context = ssl._create_unverified_context _items = { 'pretrain': {'ernie-en-uncased-large': 'https://ernie.bj.bcebos.com/ERNIE_Large_en_stable-2.0.0.tar.gz', @@ -131,13 +131,15 @@ def _convert(path, silent=False): def download(item, scope='all', path='.'): item = item.lower() scope = scope.lower() + print('1111111111111') assert item in _items, '{} is not found. Support list: {}'.format(item, list(_items.keys())) if _items[item]['utils'] is not None: _download(item, 'utils', path, silent=True) if scope != 'all': - assert scope in _items[item], '{} is not found. Support items: {}'.format(item, list(_items.keys())) + print('222222') + # assert scope in _items[item], '{} is not found. Support scopes: {}'.format(scope, list(_items[item].keys())) _download(item, scope, path) else: for s in _items[item].keys(): @@ -146,6 +148,7 @@ def download(item, scope='all', path='.'): def _ls(item, scope, l = 10): if scope != 'all': + print('33333') assert scope in _items[item], '{} is not found. Support scopes: {}'.format(scope, list(_items[item].keys())) print ('{} ==> {}'.format(item, scope)) else: @@ -160,6 +163,7 @@ def ls(item='all', scope='all'): return print ('Download list:') if item != 'all': + print('44444') assert item in _items, '{} is not found. Support scopes: {}'.format(item, list(_items.keys())) _ls(item, scope) else: -- GitLab