mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 23:48:01 -05:00
hotfix: early kwargs.pop('err') (#10197)
* hotfix: early kwargs.pop('err')
* err, no container
This commit is contained in:
@@ -185,7 +185,7 @@ function renderMemoryGraph(graph) {
|
||||
return `${p0.join(' ')} ${p1.join(' ')}`;
|
||||
}).attr("fill", d => `#${colors[d.buf.num % colors.length]}`).on("mouseover", (e, { id, buf, x }) => {
|
||||
d3.select(e.currentTarget).attr("stroke", "rgba(26, 27, 38, 0.8)").attr("stroke-width", 0.8);
|
||||
const metadata = document.querySelector(".container.metadata");
|
||||
const metadata = document.querySelector(".metadata");
|
||||
document.getElementById("current-buf")?.remove();
|
||||
const { num, dtype, nbytes, ...rest } = buf;
|
||||
let label = `<BUFFER n${num} ${dtype} ${nbytes_format(nbytes)}>\nalive for ${pluralize(x[x.length-1]-x[0], 'timestep')}`;
|
||||
|
||||
@@ -20,8 +20,9 @@ uops_colors = {Ops.LOAD: "#ffc0c0", Ops.STORE: "#87CEEB", Ops.CONST: "#e0e0e0",
|
||||
|
||||
# NOTE: if any extra rendering in VIZ fails, we don't crash
|
||||
def pcall(fxn:Callable[..., str], *args, **kwargs) -> str:
|
||||
err = kwargs.pop("err", "")
|
||||
try: return fxn(*args, **kwargs)
|
||||
except Exception: return f"ERROR in {fxn.__name__}\n{kwargs.get('err', '')}"
|
||||
except Exception: return f"ERROR in {fxn.__name__}\n{err}"
|
||||
|
||||
# ** Metadata for a track_rewrites scope
|
||||
|
||||
|
||||
Reference in New Issue
Block a user