tchbcb commited on
Commit
9170a35
·
verified ·
1 Parent(s): 8c95b99

deploy2 v4b: lora fmt + file-only check

Browse files
artifacts/m15_scripts/colab_deploy2.py CHANGED
@@ -107,9 +107,9 @@ def main():
107
  if not have("D2_LORA"):
108
  r = sh("cd %s && PYTHONPATH=%s/gguf-py python3 convert_lora_to_gguf.py "
109
  "%s --outfile %s > %s/lora_conv.log 2>&1; echo RC=$?; tail -3 %s/lora_conv.log"
110
- % (LC, LC, ADP, LORA, K8B), 3600)
111
  P("lora conv: " + r[-300:])
112
- if "RC=0" not in r or not os.path.exists(LORA) or os.path.getsize(LORA) < 1e8:
113
  raise RuntimeError("lora convert failed")
114
  flag("D2_LORA")
115
  P("lora.gguf ok (%.0fM)" % (os.path.getsize(LORA) / 1e6))
 
107
  if not have("D2_LORA"):
108
  r = sh("cd %s && PYTHONPATH=%s/gguf-py python3 convert_lora_to_gguf.py "
109
  "%s --outfile %s > %s/lora_conv.log 2>&1; echo RC=$?; tail -3 %s/lora_conv.log"
110
+ % (LC, LC, ADP, LORA, K8B, K8B), 3600)
111
  P("lora conv: " + r[-300:])
112
+ if not os.path.exists(LORA) or os.path.getsize(LORA) < 1e8: # [FIX] file-only check
113
  raise RuntimeError("lora convert failed")
114
  flag("D2_LORA")
115
  P("lora.gguf ok (%.0fM)" % (os.path.getsize(LORA) / 1e6))