[Bugfix][LogitsProcessor] Validate ':' separator in custom logits processor FQCN (#56020)
Signed-off-by: 100milliongold <gadian88@gmail.com>
This commit is contained in:
@@ -125,7 +125,13 @@ def _load_logitsprocs_by_fqcns(
|
||||
continue
|
||||
|
||||
logger.debug("- Loading logits processor %s", logitproc)
|
||||
module_path, qualname = logitproc.split(":")
|
||||
parts = logitproc.split(":")
|
||||
if len(parts) != 2:
|
||||
raise ValueError(
|
||||
f"Invalid logits processor FQCN {logitproc!r}. "
|
||||
"Expected format: '<module>:<type>'"
|
||||
)
|
||||
module_path, qualname = parts
|
||||
|
||||
try:
|
||||
# Load module
|
||||
|
||||
Reference in New Issue
Block a user