RobustBench / robustbench

RobustBench: a standardized adversarial robustness benchmark [NeurIPS 2021 Benchmarks and Datasets Track]
https://robustbench.github.io
Other
664 stars 99 forks source link

Bug Report with a Solution #161

Closed XingzhiZhou closed 9 months ago

XingzhiZhou commented 11 months ago

Bug Description When I download cifar10-c, it reports this bug.

robustbench/zenodo_download.py:82, in zenodo_download(record_id, filenames_to_download, save_dir)
     76     raise DownloadError(
     77         "The hash of the downloaded file does not match"
     78         " the expected one.")
     79 print("Download finished, extracting...")
     80 shutil.unpack_archive(filename,
     81                       extract_dir=save_dir,
---> 82                       format=file["type"])
     83 print("Downloaded and extracted.")

KeyError: 'type'

Possible Solution I checked the variable file here, and it does not contain "type" key now. I guess the reason is that the update of zenodo, such that file does not contain key type anymore. We can solve this by the following modification.

---> 82                       format=file['key'].split('.')[-1])
fra31 commented 9 months ago

Hi,

thanks for the suggestion, integrated with https://github.com/RobustBench/robustbench/pull/164.