Commit 885e09f
committed
fix: retry colab upload calls in the chunk loop and concat step
Real failure on the 5645-char/9-chunk long-form test (2026-08-17):
after ~55min and 8 successful chunks, chunk 9's upload of
chunk_index.txt failed: "File or directory not found:
/content/chunk_index.txt". Traced into google-colab-cli's
contents.py: that exact message is raised on an HTTP 404 from the
Colab backend's Contents API, not a missing local file -- the
session/kernel had gone away, likely from sustained load near the
end of a long run. Because the Colab VM is stateful but ephemeral,
losing the session this late threw away the entire run's completed
work (8 chunks of real GPU time) with nothing to resume from.
Added upload_with_retry() (3 attempts, 20s backoff) around both
uploads in the per-chunk loop, and the same retry around
chunk_count.txt's upload before the final concat step -- that one
runs after all chunks finish, so a transient failure there would be
equally expensive. Doesn't address a session that's genuinely dead
(retries will just fail three times and report clearly), but does
recover from the more likely transient-hiccup case.
Re-running the 9-chunk long-form test next to confirm.1 parent 4e2dac1 commit 885e09f
1 file changed
Lines changed: 34 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
210 | 233 | | |
211 | 234 | | |
212 | 235 | | |
213 | | - | |
214 | | - | |
| 236 | + | |
| 237 | + | |
215 | 238 | | |
216 | 239 | | |
217 | 240 | | |
| |||
230 | 253 | | |
231 | 254 | | |
232 | 255 | | |
233 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
234 | 265 | | |
235 | 266 | | |
236 | 267 | | |
| |||
0 commit comments