Error on downloading dataset failed when running the shipping notebook.
num_frames = 100
settings = config_settings.ConfigSettings('./configs/accuracy_infer_on_j7.yaml',
num_frames=num_frames,
task_selection = selected_task_id.value,
dataset_loading = selected_dataset_id.value)
_ = datasets.download_datasets(settings)
INFO:20230414-191956: downloading and preparing dataset - datasets/imagenetv2c/val This may take some time. The ImageNetV2 dataset contains new test data for the ImageNet benchmark. It is smaller in size and faster to download - ImageNetV2c closely matches the accuracy obtained with original ImageNet. So it is a good choice for quick benchmarking. Reference : Do ImageNet Classifiers Generalize to ImageNet? Benjamin Recht et.al. https://arxiv.org/abs/1902.10811 Source Code: https://github.com/modestyachts/ImageNetV2 Original ImageNet Dataset URL: http://image-net.org Downloading https://s3-us-west-2.amazonaws.com/imagenetv2public/imagenetv2-top-images.tar.gz to datasets/imagenetv2c/download/imagenetv2-top-images.tar.gz
0/? [00:00<?, ?it/s]
Failed download. Trying https -> http instead. Downloading http://s3-us-west-2.amazonaws.com/imagenetv2public/imagenetv2-top-images.tar.gz to datasets/imagenetv2c/download/imagenetv2-top-images.tar.gz
0/? [00:00<?, ?it/s]
HTTPErrorTraceback (most recent call last) /opt/edgeai-benchmark/jai_benchmark/utils/download_utils.py in download_url(url, root, filename, md5, max_redirect_hops, force_download) 258 url, fpath, --> 259 reporthook=gen_bar_updater() 260 ) /usr/lib/python3.6/urllib/request.py in urlretrieve(url, filename, reporthook, data) 247 --> 248 with contextlib.closing(urlopen(url, data)) as fp: 249 headers = fp.info() /usr/lib/python3.6/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 222 opener = _opener --> 223 return opener.open(url, data, timeout) 224 /usr/lib/python3.6/urllib/request.py in open(self, fullurl, data, timeout) 531 meth = getattr(processor, meth_name) --> 532 response = meth(req, response) 533 /usr/lib/python3.6/urllib/request.py in http_response(self, request, response) 641 response = self.parent.error( --> 642 'http', request, response, code, msg, hdrs) 643 /usr/lib/python3.6/urllib/request.py in error(self, proto, *args) 569 args = (dict, 'default', 'http_error_default') + orig_args --> 570 return self._call_chain(*args) 571 /usr/lib/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args) 503 func = getattr(handler, meth_name) --> 504 result = func(*args) 505 if result is not None: /usr/lib/python3.6/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs) 649 def http_error_default(self, req, fp, code, msg, hdrs): --> 650 raise HTTPError(req.full_url, code, msg, hdrs, fp) 651 HTTPError: HTTP Error 403: Forbidden During handling of the above exception, another exception occurred: HTTPErrorTraceback (most recent call last) <ipython-input-4-29f99df06d14> in <module> 5 task_selection = selected_task_id.value, 6 dataset_loading = selected_dataset_id.value) ----> 7 _ = datasets.download_datasets(settings) /opt/edgeai-benchmark/jai_benchmark/datasets/__init__.py in download_datasets(settings, download) 350 # if the dataset folders are missing, it will be downloaded and extracted 351 # set download='always' to force re-download the datasets --> 352 settings.dataset_cache = get_datasets(settings, download=download) 353 return True 354 /opt/edgeai-benchmark/jai_benchmark/datasets/__init__.py in get_datasets(settings, download) 142 # but only one is selected and assigned to the key imagenet 143 # all the imagenet models will use this variant. --> 144 dataset_cache['imagenet']['calibration_dataset'] = ImageNetDataSetType(**imagenet_cls_calib_cfg, download=download) 145 dataset_cache['imagenet']['input_dataset'] = ImageNetDataSetType(**imagenet_cls_val_cfg, download=False) 146 # /opt/edgeai-benchmark/jai_benchmark/datasets/imagenetv2.py in __init__(self, name, *args, **kwargs) 117 def __init__(self, *args, name='imagenetv2c', **kwargs): 118 url = 's3-us-west-2.amazonaws.com/.../imagenetv2-top-images.tar.gz' --> 119 super().__init__(*args, url=url, name=name, **kwargs) /opt/edgeai-benchmark/jai_benchmark/datasets/imagenetv2.py in __init__(self, num_classes, url, download, num_frames, name, *args, **kwargs) 50 self.class_names_dict = None 51 self.class_ids_dict = None ---> 52 super().__init__(*args, num_classes=num_classes, download=download, num_frames=num_frames, name=name, **kwargs) 53 54 def get_notice(self): /opt/edgeai-benchmark/jai_benchmark/datasets/image_cls.py in __init__(self, download, dest_dir, num_frames, name, **kwargs) 50 print(utils.log_color('\nINFO', 'dataset exists - will reuse', path)) 51 else: ---> 52 self.download(path, split_file) 53 # 54 # /opt/edgeai-benchmark/jai_benchmark/datasets/imagenetv2.py in download(self, path, split_file) 72 extract_root = os.path.join(download_root, 'rawdata') 73 extract_path = utils.download_file(self.url, root=download_root, extract_root=extract_root, mode='r', ---> 74 force_download=self.force_download) 75 76 folders = utils.list_dir(os.path.join(extract_path, 'imagenetv2-top-images-format-val')) /opt/edgeai-benchmark/jai_benchmark/utils/download_utils.py in download_file(url, root, extract_root, filename, md5, mode, force_download, force_linkfile) 124 # 125 fpath = download_and_extract_archive(url, root, extract_root=extract_root, filename=filename, --> 126 md5=md5, mode=mode,force_download=force_download) 127 return fpath 128 /opt/edgeai-benchmark/jai_benchmark/utils/download_utils.py in download_and_extract_archive(url, download_root, extract_root, filename, md5, remove_finished, mode, force_download) 474 # 475 if isinstance(url, str) and (url.startswith('http://') or url.startswith('https://')): --> 476 fpath = download_url(url, download_root, filename, md5, force_download=force_download) 477 else: 478 fpath = url /opt/edgeai-benchmark/jai_benchmark/utils/download_utils.py in download_url(url, root, filename, md5, max_redirect_hops, force_download) 267 urllib.request.urlretrieve( 268 url, fpath, --> 269 reporthook=gen_bar_updater() 270 ) 271 else: /usr/lib/python3.6/urllib/request.py in urlretrieve(url, filename, reporthook, data) 246 url_type, path = splittype(url) 247 --> 248 with contextlib.closing(urlopen(url, data)) as fp: 249 headers = fp.info() 250 /usr/lib/python3.6/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 221 else: 222 opener = _opener --> 223 return opener.open(url, data, timeout) 224 225 def install_opener(opener): /usr/lib/python3.6/urllib/request.py in open(self, fullurl, data, timeout) 530 for processor in self.process_response.get(protocol, []): 531 meth = getattr(processor, meth_name) --> 532 response = meth(req, response) 533 534 return response /usr/lib/python3.6/urllib/request.py in http_response(self, request, response) 640 if not (200 <= code < 300): 641 response = self.parent.error( --> 642 'http', request, response, code, msg, hdrs) 643 644 return response /usr/lib/python3.6/urllib/request.py in error(self, proto, *args) 568 if http_err: 569 args = (dict, 'default', 'http_error_default') + orig_args --> 570 return self._call_chain(*args) 571 572 # XXX probably also want an abstract factory that knows when it makes /usr/lib/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args) 502 for handler in handlers: 503 func = getattr(handler, meth_name) --> 504 result = func(*args) 505 if result is not None: 506 return result /usr/lib/python3.6/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs) 648 class HTTPDefaultErrorHandler(BaseHandler): 649 def http_error_default(self, req, fp, code, msg, hdrs): --> 650 raise HTTPError(req.full_url, code, msg, hdrs, fp) 651 652 class HTTPRedirectHandler(BaseHandler): HTTPError: HTTP Error 403: Forbidden