[model.from_pretrained] raise exception early on failed load (#12574)
* [model.from_pretrained] raise exception early on failed load
Currently if `load` pretrained weights fails in `from_pretrained`, we first print a whole bunch of successful messages and then fail - this PR puts the exception first to avoid all the misleading messages.
* style
Co-authored-by:
Suraj Patil <surajp815@gmail.com>
Showing
Please register or sign in to comment