Merge branch 'pr/3055'

This commit is contained in:
Daniel Han 2025-07-29 00:43:19 -07:00
commit 86e226dd34

View file

@ -222,7 +222,9 @@ class _RaiseUninitialized(logging.Handler):
super().__init__()
def emit(self, record):
record_lower = str(record).lower()
if "some weights of" in record_lower and "score.weight" not in record_lower:
if ("some weights of" in record_lower) and \
("score.weight" not in record_lower) and \
("classifier.weight" not in record_lower):
raise Exception(
f"Unsloth: Critical error since some weights are not initialized.\n"\
f"Please try updating Unsloth, transformers and timm via:\n"\