[Bugfix] Lower gemma's unloaded_params exception to warning (#7002)

This commit is contained in:
Michael Goin
2024-08-01 12:01:07 -07:00
committed by GitHub
parent fb3db61688
commit f4fd390f5d
3 changed files with 12 additions and 9 deletions
+3 -3
View File
@@ -342,6 +342,6 @@ class PaliGemmaForConditionalGeneration(nn.Module, SupportsVision):
unloaded_params = params_dict.keys() - loaded_params
if unloaded_params:
raise RuntimeError(
"Some weights are not initialized from checkpoints: "
f"{unloaded_params}")
logger.warning(
"Some weights are not initialized from checkpoints: %s",
unloaded_params)