瀏覽代碼

convert: return name of unsupported architecture (#9862)

When a model's architecture cannot be converted return the name of the unsupported arch in the error message.
Bruce MacDonald 1 月之前
父節點
當前提交
61a8825216
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      convert/convert.go

+ 1 - 1
convert/convert.go

@@ -201,7 +201,7 @@ func ConvertModel(fsys fs.FS, ws io.WriteSeeker) error {
 	case "CohereForCausalLM":
 		conv = &commandrModel{}
 	default:
-		return errors.New("unsupported architecture")
+		return fmt.Errorf("unsupported architecture %q", p.Architectures[0])
 	}
 
 	if err := json.Unmarshal(bts, conv); err != nil {