Spaces:
Running
Running
debug: link coverage
Browse files509 unmodified lines510511512509 unmodified lines@app.get("/")def root():return {"ok": True, "see": "/api/status"}509 unmodified lines510511512513514515516517518519520521522523524525509 unmodified lines@app.get("/")def root():return {"ok": True, "see": "/api/status"}@app.get("/api/debug/links")def debug_links(seg: int):need_ready()deg = np.diff(X["lptr"])a, b = int(X["lptr"][seg]), int(X["lptr"][seg + 1])w0, w1 = work_of(seg)wd = deg[w0:w1]return {"pairs": int(len(X["ldst"])), "segs_with_links": int((deg > 0).sum()), "deg": b - a,"work": X["title"][seg], "work_segs": w1 - w0, "work_segs_linked": int((wd > 0).sum()),"sample": [refs(int(t))[0] for t in X["ldst"][a:a + 8]],"linked_in_work": [refs(w0 + int(i))[0] for i in np.flatnonzero(wd > 0)[:5]]}
app.py+13