Skip to content

Commit 4aecd8f

Browse files
larsgebclaude
andcommitted
debug: re-add cell progress log to find new crash point in demo.py
The crash moved to a later cell after removing N=50M and fixing max_iter. Re-add per-cell logging to identify the new offending cell. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f00b986 commit 4aecd8f

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

demo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,9 @@ def logstar(x, base=np.e, threshold=1.0):
424424
ax.imshow(logn1p(mandel_gpu, n=50), cmap="inferno", extent=[-2, 1, -1.5, 1.5], origin="lower")
425425
ax.set_xlabel("Re(c)")
426426
ax.set_ylabel("Im(c)")
427-
ax.set_title(f"Mandelbrot Set — {width}x{height}, max_iter={max_iter_vis}\nGPU time: {t_gpu * 1e3:.1f} ms")
427+
ax.set_title(
428+
f"Mandelbrot Set — {width}x{height}, max_iter={max_iter_vis}\nGPU time: {t_gpu * 1e3:.1f} ms"
429+
)
428430
plt.tight_layout()
429431
plt.show()
430432

scripts/render_notebooks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def _patched_show(*_args, **_kwargs) -> None:
8282
if not src:
8383
continue
8484

85+
preview = src.splitlines()[0][:60]
86+
print(f" [cell {exec_count}] {preview}", file=sys.__stdout__, flush=True)
87+
8588
cell_images.clear()
8689
stdout_buf = io.StringIO()
8790

0 commit comments

Comments
 (0)