blazingly faster
Validate Operations / validate-operations (push) Has been cancelled

This commit is contained in:
NiccoloN
2026-07-19 09:59:49 +02:00
parent 5f42da36ae
commit ab54243fda
76 changed files with 4363 additions and 4323 deletions
+3 -3
View File
@@ -70,7 +70,7 @@ The server defaults to `127.0.0.1:8765`. It has no authentication and is intende
## Supported CSV reports
Files are paired using the complete prefix before `.nodes.csv` and `.edges.csv`. That prefix is the stable `report_id`; `spatial2_scheduled_no_comm.nodes.csv` therefore pairs only with `spatial2_scheduled_no_comm.edges.csv`.
Files are paired using the complete prefix before `.nodes.csv` and `.edges.csv`. That prefix is the stable `report_id`; `spatial3_scheduled_no_comm.nodes.csv` therefore pairs only with `spatial3_scheduled_no_comm.edges.csv`.
Node columns:
@@ -116,7 +116,7 @@ Nodes group by `(report_id, node_kind)`. This deliberately small diagnostic view
### Raw instances
Raw instances displays every `raw_nodes` row exactly once and every valid `raw_edges` row exactly once. Nodes are queried independently from edges, so degree-zero nodes remain visible. A spatial3 report starts in this view automatically; Operation, Core, and Node kind remain selectable.
Raw instances displays every `raw_nodes` row exactly once and every valid `raw_edges` row exactly once. Nodes are queried independently from edges, so degree-zero nodes remain visible. A spatial4 report starts in this view automatically; Operation, Core, and Node kind remain selectable.
Spatial3 CSVs record explicit communication only and may legitimately contain many isolated nodes. The explorer never fabricates dependencies from semicolon-separated SSA names or other node text.
@@ -155,7 +155,7 @@ Motifs are not inferred from rendered geometry. For each operation graph the too
## Viewer and API
Except for spatial3, the viewer initially fetches an aggregate operation graph unless the browser has a saved view choice. Sigma renders the graph with WebGL. Controls cover report/view/metric selection, text and tensor search, mapping filters, self edges, relayout, fitting, and motif selection. Raw nodes and edges have their own selection details and never call aggregate-only detail or mapping endpoints. Mapping panels remain available for operation aggregate edges.
Except for spatial4, the viewer initially fetches an aggregate operation graph unless the browser has a saved view choice. Sigma renders the graph with WebGL. Controls cover report/view/metric selection, text and tensor search, mapping filters, self edges, relayout, fitting, and motif selection. Raw nodes and edges have their own selection details and never call aggregate-only detail or mapping endpoints. Mapping panels remain available for operation aggregate edges.
Operation expansion is a deterministic projection of the source graph. Expand selected, Expand all operations, Collapse selected operation, and Collapse all rebuild the complete display from the current expanded-operation set. An expanded operation's raw nodes replace its aggregate node, including isolated raw nodes. An aggregate edge is retained only when both endpoint operations are collapsed; otherwise its raw edges replace it with endpoints calculated from the complete expansion set. Expansion order therefore cannot leave stale endpoints or simultaneous aggregate/raw representations.
@@ -84,7 +84,7 @@ The server defaults to `127.0.0.1:8765`. It has no authentication and is intende
## Supported CSV reports
Files are paired using the complete prefix before `.nodes.csv` and `.edges.csv`. That prefix is the stable `report_id`; `spatial2_scheduled_no_comm.nodes.csv` therefore pairs only with `spatial2_scheduled_no_comm.edges.csv`.
Files are paired using the complete prefix before `.nodes.csv` and `.edges.csv`. That prefix is the stable `report_id`; `spatial3_scheduled_no_comm.nodes.csv` therefore pairs only with `spatial3_scheduled_no_comm.edges.csv`.
Node columns:
@@ -130,7 +130,7 @@ Nodes group by `(report_id, node_kind)`. This deliberately small diagnostic view
### Raw instances
Raw instances displays every `raw_nodes` row exactly once and every valid `raw_edges` row exactly once. Nodes are queried independently from edges, so degree-zero nodes remain visible. A spatial3 report starts in this view automatically; Operation, Core, and Node kind remain selectable.
Raw instances displays every `raw_nodes` row exactly once and every valid `raw_edges` row exactly once. Nodes are queried independently from edges, so degree-zero nodes remain visible. A spatial4 report starts in this view automatically; Operation, Core, and Node kind remain selectable.
Spatial3 CSVs record explicit communication only and may legitimately contain many isolated nodes. The explorer never fabricates dependencies from semicolon-separated SSA names or other node text.
@@ -169,7 +169,7 @@ Motifs are not inferred from rendered geometry. For each operation graph the too
## Viewer and API
Except for spatial3, the viewer initially fetches an aggregate operation graph unless the browser has a saved view choice. Sigma renders the graph with WebGL. Controls cover report/view/metric selection, text and tensor search, mapping filters, self edges, relayout, fitting, and motif selection. Raw nodes and edges have their own selection details and never call aggregate-only detail or mapping endpoints. Mapping panels remain available for operation aggregate edges.
Except for spatial4, the viewer initially fetches an aggregate operation graph unless the browser has a saved view choice. Sigma renders the graph with WebGL. Controls cover report/view/metric selection, text and tensor search, mapping filters, self edges, relayout, fitting, and motif selection. Raw nodes and edges have their own selection details and never call aggregate-only detail or mapping endpoints. Mapping panels remain available for operation aggregate edges.
Operation expansion is a deterministic projection of the source graph. Expand selected, Expand all operations, Collapse selected operation, and Collapse all rebuild the complete display from the current expanded-operation set. An expanded operation's raw nodes replace its aggregate node, including isolated raw nodes. An aggregate edge is retained only when both endpoint operations are collapsed; otherwise its raw edges replace it with endpoints calculated from the complete expansion set. Expansion order therefore cannot leave stale endpoints or simultaneous aggregate/raw representations.
@@ -1,7 +1,6 @@
README.md
pyproject.toml
raptor_graph_explorer/__init__.py
raptor_graph_explorer/__main__.py
raptor_graph_explorer/aggregate.py
raptor_graph_explorer/api.py
raptor_graph_explorer/cli.py
@@ -0,0 +1 @@
__version__ = "0.1.0"
@@ -18,7 +18,7 @@ function definition(object, keys) {
function status(message, error = false) { $("status").textContent = message; $("status").className = error ? "error" : ""; }
function selectedReport() { return state.reports.find(report => report.report_id === $("report").value); }
function defaultViewForReport(report) {
if (report?.stage === "spatial3") return "raw";
if (report?.stage === "spatial4") return "raw";
const saved = localStorage.getItem("raptor-graph-view");
return ["operation", "raw", "core", "node_kind"].includes(saved) ? saved : "operation";
}
@@ -1,2 +1,2 @@
Source,Target,Weight,Type,stage,source_lane,target_lane,channel_id
scb:1:5,sc:0,512,tensor<1x8x1x16xf32>,spatial3,5,,0
scb:1:5,sc:0,512,tensor<1x8x1x16xf32>,spatial4,5,,0
1 Source Target Weight Type stage source_lane target_lane channel_id
2 scb:1:5 sc:0 512 tensor<1x8x1x16xf32> spatial3 spatial4 5 0
@@ -79,8 +79,8 @@ def test_collapse_reconstructs_every_boundary(regression_output: Path):
assert all(edge["representation"] == "raw" for edge in graph["edges"])
def test_spatial3_includes_isolated_nodes_and_has_distinct_positions(regression_output: Path):
graph = project(regression_output, "spatial3_scheduled", view="raw")
def test_spatial4_includes_isolated_nodes_and_has_distinct_positions(regression_output: Path):
graph = project(regression_output, "spatial4_scheduled", view="raw")
assert graph["counts"] == {
"nodes": 16, "edges": 1, "isolated_nodes": 14,
"raw_nodes": 16, "aggregate_nodes": 0, "raw_edges": 1, "aggregate_edges": 0,
@@ -100,20 +100,20 @@ def test_header_only_edges_preserve_all_nodes(regression_output: Path):
def test_projection_cap_is_actionable_and_never_partial(regression_output: Path):
with pytest.raises(DisplayGraphTooLarge, match="Use an aggregate view or increase"):
project(regression_output, "spatial3_scheduled", view="raw", cap=16)
project(regression_output, "spatial4_scheduled", view="raw", cap=16)
client = TestClient(create_app(regression_output, expansion_cap=16))
response = client.get("/api/reports/spatial3_scheduled/display-graph?view=raw")
response = client.get("/api/reports/spatial4_scheduled/display-graph?view=raw")
assert response.status_code == 400
assert "safety cap" in response.json()["detail"] and "aggregate view" in response.json()["detail"]
def test_display_api_and_static_raw_interactions(regression_output: Path):
client = TestClient(create_app(regression_output))
assert client.get("/api/reports/spatial3_scheduled/display-graph?view=raw").json()["counts"]["nodes"] == 16
assert client.get("/api/reports/spatial4_scheduled/display-graph?view=raw").json()["counts"]["nodes"] == 16
index = client.get("/").text
script = client.get("/app.js").text
assert '<option value="raw">Raw instances</option>' in index
assert 'report?.stage === "spatial3"' in script
assert 'report?.stage === "spatial4"' in script
assert 'local.representation === "raw"' in script
reducer = script[script.index("function reduceEdge"):script.index("function applyFilters")]
assert "state.graph.source(id)" not in reducer