cs3319-project2 / docs /diagrams /src /dependencies.dot
NLP-beginner's picture
CS3319 Project 2 final deliverable (public F1 = 0.96626)
f28d994
Raw
History Blame Contribute Delete
5.34 kB
// CS3319 Project 2 — Key-module dependency graph (Graphviz DOT)
// Edges read "A -> B" = A loads B at runtime via importlib load_module()
// (no utils.py; sibling scripts reuse each other as modules).
// Backbone edges (final stacker -> stage-1 producers) are drawn bold/dark;
// shared-library fan-in is drawn light to keep the graph readable.
// Verified against the actual load_module() calls in code/ and the project
// import map. Only KEY modules are shown (see docs/diagrams/README.md).
// Render: dot -Tsvg dependencies.dot -o ../svg/dependencies.svg
digraph cs3319_deps {
rankdir=TB;
bgcolor="white";
fontname="Helvetica";
labelloc="t";
fontsize=16;
label="CS3319 — key-module dependency graph (runtime load_module)";
node [fontname="Helvetica", fontsize=11, style="filled,rounded", shape=box, margin="0.12,0.07"];
edge [fontname="Helvetica", fontsize=9];
// ---------- shared libraries (roots everyone depends on) ----------
subgraph cluster_shared {
label="Shared libraries (loaded by ~12 scripts each)";
style="filled,rounded"; color="#dddddd"; fillcolor="#fafafa";
train_val [label="train_val_lgcn_ensemble\n(data · split · best_f1)", fillcolor="#fff4e6", color="#d98c00"];
stack_rank [label="stack_rank_calibration\n(explicit feats · rank)", fillcolor="#fff4e6", color="#d98c00"];
}
// ---------- stage-1 feature / score builders ----------
subgraph cluster_stage1 {
label="Stage-1 feature / score builders";
style="filled,rounded"; color="#cfe8d8"; fillcolor="#f4fbf6";
post95 [label="post95_ablation\n(negative evidence)", fillcolor="#eafaf0", color="#1e8449"];
gen_post95 [label="generate_post95_submission\n(variants · top-k)", fillcolor="#eafaf0", color="#1e8449"];
extra [label="extra_score_sources_ablation\n(content · BPR)", fillcolor="#eafaf0", color="#1e8449"];
rw_systematic [label="randomwalk_systematic_ablation\n(7 RW blocks · X_base)", fillcolor="#eafaf0", color="#1e8449"];
content_rich [label="content_rich_ablation\n(rich 18-d)", fillcolor="#eafaf0", color="#1e8449"];
rw_ensemble [label="generate_randomwalk_\nensemble_submission (aggregate)", fillcolor="#eafaf0", color="#1e8449"];
}
// ---------- final stacker ----------
high_order [label="high_order_graph_stack\nFINAL STACKER\n259-d LightGBM · rank cutoff", fillcolor="#fdecea", color="#c0392b", penwidth=2];
// ---------- peripheral / analysis ----------
subgraph cluster_periph {
label="Peripheral / analysis";
style="filled,rounded"; color="#e2e3e5"; fillcolor="#f7f7f9";
node2vec [label="node2vec_deepwalk_ablation", fillcolor="#eef0f3", color="#6c757d"];
error_grp [label="error_group_calibration", fillcolor="#eef0f3", color="#6c757d"];
gen_crich [label="generate_content_rich_submission", fillcolor="#eef0f3", color="#6c757d"];
}
// ---------- backbone: final stacker orchestrates the producers (bold) ----------
edge [color="#1a1a1a", penwidth=1.8, style=bold];
high_order -> rw_systematic;
high_order -> content_rich;
high_order -> rw_ensemble;
high_order -> gen_post95;
high_order -> post95;
high_order -> extra;
high_order -> stack_rank [style=bold, color="#1a1a1a"];
// ---------- stage-1 inter-dependencies ----------
edge [color="#3a7d4f", penwidth=1.1, style=solid, constraint=true];
gen_post95 -> post95;
extra -> gen_post95; extra -> post95;
rw_systematic -> gen_post95; rw_systematic -> extra; rw_systematic -> post95;
content_rich -> gen_post95; content_rich -> extra; content_rich -> post95;
rw_ensemble -> rw_systematic; rw_ensemble -> gen_post95; rw_ensemble -> extra; rw_ensemble -> post95;
// ---------- peripheral ----------
edge [color="#8a8f98", penwidth=1.0, style=dashed];
gen_crich -> content_rich;
node2vec -> extra; node2vec -> gen_post95; node2vec -> post95;
error_grp -> extra; error_grp -> gen_post95; error_grp -> post95;
// ---------- shared-library fan-in (light, low-rank to avoid hairball) ----------
edge [color="#b0b0b0", penwidth=0.9, style=dotted, arrowhead=vee, constraint=false];
post95 -> stack_rank; post95 -> train_val;
gen_post95 -> stack_rank; gen_post95 -> train_val;
extra -> stack_rank; extra -> train_val;
rw_systematic -> stack_rank; rw_systematic -> train_val;
content_rich -> stack_rank; content_rich -> train_val;
rw_ensemble -> stack_rank; rw_ensemble -> train_val;
gen_crich -> stack_rank; gen_crich -> train_val;
node2vec -> stack_rank; node2vec -> train_val;
error_grp -> stack_rank; error_grp -> train_val;
// ---------- legend ----------
subgraph cluster_legend {
label="Legend"; style="rounded"; color="#cccccc"; fontsize=10;
l1 [label="bold dark = final stacker loads producer", shape=plaintext, fillcolor="white"];
l2 [label="solid green = producer reuses producer", shape=plaintext, fillcolor="white"];
l3 [label="dotted grey = loads shared library", shape=plaintext, fillcolor="white"];
l1 -> l2 -> l3 [style=invis];
}
}