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