tchbcb commited on
Commit
36cafc8
·
verified ·
1 Parent(s): a808312

deploy2 v2: convert check by file-only (tqdm stderr flood pit#69)

Browse files
artifacts/m15_scripts/colab_deploy2.py CHANGED
@@ -52,8 +52,8 @@ def main():
52
  "%s --outfile %s --outtype f16 > %s/convert2.log 2>&1; echo RC=$?; tail -2 %s/convert2.log"
53
  % (LC, LC, BASE, F16, K8B, K8B), 14400)
54
  P("convert: " + r[-250:])
55
- if "RC=0" not in r or not os.path.exists(F16) or os.path.getsize(F16) < 15e9:
56
- raise RuntimeError("convert failed")
57
  flag("D2_CONVERT")
58
  P("convert ok (%.1fG, %.0fs)" % (os.path.getsize(F16) / 1e9, time.time() - t0))
59
  # 删底模 HF 缓存 (symlink BASE 指向它, convert 后无用)
 
52
  "%s --outfile %s --outtype f16 > %s/convert2.log 2>&1; echo RC=$?; tail -2 %s/convert2.log"
53
  % (LC, LC, BASE, F16, K8B, K8B), 14400)
54
  P("convert: " + r[-250:])
55
+ if not os.path.exists(F16) or os.path.getsize(F16) < 15e9:
56
+ raise RuntimeError("convert failed") # [FIX] 只信文件, RC 被 tqdm stderr 淹没 (坑#69)
57
  flag("D2_CONVERT")
58
  P("convert ok (%.1fG, %.0fs)" % (os.path.getsize(F16) / 1e9, time.time() - t0))
59
  # 删底模 HF 缓存 (symlink BASE 指向它, convert 后无用)