pull/1210/merge
Daniel Nouri 3 years ago committed by GitHub
commit 1ba6902461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -272,8 +272,7 @@ def load_pretrained(
else: else:
state_dict = load_state_dict_from_hf(pretrained_loc) state_dict = load_state_dict_from_hf(pretrained_loc)
else: else:
_logger.warning("No pretrained weights exist or were found for this model. Using random initialization.") raise ValueError("No pretrained weights exist or were found for this model.")
return
if filter_fn is not None: if filter_fn is not None:
# for backwards compat with filter fn that take one arg, try one first, the two # for backwards compat with filter fn that take one arg, try one first, the two

Loading…
Cancel
Save