Better key error for AutoConfig (#27976)
* Improve the error printed when loading an unrecognized architecture
* Improve the error printed when loading an unrecognized architecture
* Raise a ValueError instead because KeyError prints weirdly
* make fixup