RobustBench / robustbench

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

AttributeError: module 'timm.models._registry' has no attribute 'get_pretrained_cfgs_for_arch' #196

Open ElyasYassin opened 1 month ago

ElyasYassin commented 1 month ago

from robustbench.utils import clean_accuracy from robustbench.utils import load_model

AttributeError: module 'timm.models._registry' has no attribute 'get_pretrained_cfgs_for_arch'

mjzohr commented 1 month ago

I think the issue is because of the timm library. I solved this using by downgrading the library using this to a previous version: timm releases, I used:
pip install timm==1.0.9

ramosv commented 1 month ago

This fixed it, thank you.

rwightman commented 1 month ago

usages of from timm.models.registry import register_model that exist in this lib should be changed to from timm.models import register_model it was deprecated 2 years ago

dedeswim commented 1 month ago

Thanks @ElyasYassin for raising the issue and thanks @rwightman for letting us know how to fix it. I will change this as soon as possible!