You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use InferFileType in getProcessor for unrecognized file extensions (#499)
* feat(modelfile): add InferFileType with size-based heuristic fallback
Adds FileType enum and InferFileType function that combines extension
pattern matching with a size-based heuristic for unrecognized files
(>128MB -> model weight, otherwise -> code).
Refs: #497
Signed-off-by: Zhao Chen <winters.zc@antgroup.com>
* refactor(modelfile): use InferFileType in workspace scanner
Replace inline switch-case with InferFileType call, eliminating
duplicated file type classification logic.
Refs: #497
Signed-off-by: Zhao Chen <winters.zc@antgroup.com>
* fix(backend): use InferFileType in getProcessor for unrecognized files
getProcessor now calls modelfile.InferFileType instead of returning nil
for unrecognized file extensions. Unrecognized files fall back to
size-based heuristic: >128MB treated as model weight, otherwise as code.
Signature changed to return error (for os.Stat failure).
Fixes: #497
Signed-off-by: Zhao Chen <winters.zc@antgroup.com>
* fix(backend): remove redundant filename from error wrapping
getProcessor already includes the filename in its error messages,
so the callers in Attach and Upload no longer duplicate it.
Signed-off-by: Zhao Chen <winters.zc@antgroup.com>
---------
Signed-off-by: Zhao Chen <winters.zc@antgroup.com>
0 commit comments