HayrettinIscan commited on
Commit
189cad7
·
verified ·
1 Parent(s): fe7f66c

Validate npz after prefetch

Browse files
Files changed (1) hide show
  1. scripts/stream_train_autoloop.py +16 -3
scripts/stream_train_autoloop.py CHANGED
@@ -120,9 +120,22 @@ def _prefetch_uid(uid: str, token: str) -> bool:
120
  got_render = True
121
  except Exception:
122
  continue
123
- if not got_render:
124
- _log(f"UYARI: {uid} render yok, siyah pad ile devam")
125
- return (dest / "geometry_latent.npz").exists()
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  except Exception as exc:
127
  msg = str(exc).lower()
128
  if "429" in msg or "rate limit" in msg:
 
120
  got_render = True
121
  except Exception:
122
  continue
123
+ if not (dest / "geometry_latent.npz").exists():
124
+ return False
125
+ # Bozuk npz'yi erken yakala
126
+ try:
127
+ import numpy as np
128
+
129
+ with np.load(dest / "geometry_latent.npz") as z:
130
+ _ = z["vertex_hist"]
131
+ except Exception as exc:
132
+ _log(f"Bozuk latent silindi uid={uid}: {exc}")
133
+ try:
134
+ (dest / "geometry_latent.npz").unlink(missing_ok=True)
135
+ except OSError:
136
+ pass
137
+ return False
138
+ return True
139
  except Exception as exc:
140
  msg = str(exc).lower()
141
  if "429" in msg or "rate limit" in msg: