fix: handle plugin logging
This commit is contained in:
@@ -44,12 +44,9 @@ class Gemma3TextFromMultimodalPlugin(BasePlugin):
|
|||||||
This runs before Pydantic validation, so ``cfg`` is a raw dict.
|
This runs before Pydantic validation, so ``cfg`` is a raw dict.
|
||||||
"""
|
"""
|
||||||
if not cfg.get("gemma3_text_from_multimodal", True):
|
if not cfg.get("gemma3_text_from_multimodal", True):
|
||||||
LOG.info("Gemma3TextFromMultimodalPlugin: disabled via config")
|
raise ValueError(
|
||||||
return
|
"Gemma3TextFromMultimodalPlugin: disabled via config, but plugin selected"
|
||||||
|
)
|
||||||
LOG.info(
|
|
||||||
"Gemma3TextFromMultimodalPlugin: configuring multimodal → text-only loading"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Flag for load_model_config() to extract the text sub-config
|
# Flag for load_model_config() to extract the text sub-config
|
||||||
cfg["extract_text_config"] = True
|
cfg["extract_text_config"] = True
|
||||||
@@ -74,15 +71,9 @@ class Gemma3TextFromMultimodalPlugin(BasePlugin):
|
|||||||
cfg.model_config_type,
|
cfg.model_config_type,
|
||||||
)
|
)
|
||||||
|
|
||||||
if cfg.is_multimodal:
|
if cfg.is_multimodal or cfg.processor_type:
|
||||||
LOG.warning(
|
raise ValueError(
|
||||||
"Gemma3TextFromMultimodalPlugin: cfg.is_multimodal is True. "
|
"Multimodal mode is enabled (processor_type set), but "
|
||||||
"The model will be loaded via the multimodal trainer path, "
|
"Gemma3TextFromMultimodalPlugin enabled. "
|
||||||
"which may not support sample packing or LoRA kernels."
|
"Please disable one of the two."
|
||||||
)
|
)
|
||||||
|
|
||||||
LOG.info(
|
|
||||||
"Gemma3TextFromMultimodalPlugin: model_config_type=%s, is_multimodal=%s",
|
|
||||||
cfg.model_config_type,
|
|
||||||
cfg.is_multimodal,
|
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user