feat(kganomaly): add streaming denoising backend with KG-likelihood metric
Andrej Janchevski
bc4fc5c
- New endpoints emit Server-Sent Events via api/renderers.py so the
diffusion reverse process streams progress + frame previews instead of
blocking on a single response.
- kg_likelihood.py exposes a per-step mean log-sigmoid score from the
frozen KG embedder + link ranker; kg_anomaly_inference.py logs it on
frame boundaries and attaches kg_log_likelihood / kg_log_likelihood_step
to progress events so the UI can render a "denoising-is-working"
trace alongside step-duration sparklines.
- registry._build_sample_subgraphs now accepts a seed (so each request
gets a different DFS partition), shuffles candidate (row, col) pairs,
and rejects ill-shaped bipartite samples whose halves can't form valid
inpaint quadrants. Sampler.get_context_subgraph_samples_dfs gains the
matching seed parameter in the research code.
- api.yaml + backend README document the new optional progress fields.
feat(coins): add sample-query endpoint and resolve Freebase MIDs to names
Andrej Janchevski
db54566
Add GET /coins/datasets/{id}/sample-query that produces structurally
valid KG queries for all 7 query structures by delegating to
Query.instantiate() from the research code rather than hand-rolling
graph walks. Returns anchors, variables, relations, and a known target
entity — guaranteed to form a real path/intersection in the training KG.
Also resolve Freebase MID identifiers (e.g. /m/06rf7) to human-readable
names (e.g. Schleswig Holstein) using the ent2name.txt lookup table:
- Entity and relation search endpoints now return a `label` field with
cleaned display names alongside the raw `name`
- Search filtering matches against both raw names and cleaned labels,
so searching "Chicago" finds /m/01yjl (Chicago Cubs)
- sample-query and sample-triples responses carry resolved labels
fix(research): drop remaining wandb calls and qualify kg imports
Andrej Janchevski
95c7d01
Continues the wandb-removal pass so the research modules can be loaded
from the Django backend without the optional dependency. Also switches
diffusion_model_discrete_kg.py to fully qualified imports
(graph_generation.src.diffusion.*, graph_generation.src.metrics.*) to
avoid name collisions with MultiProxAn's own metrics package, which is
also on sys.path at runtime.
fix(research): remove wandb dependency and guard optional imports
Andrej Janchevski
16cab72
- Strip wandb imports and calls from MultiProxAn diffusion models and
utils (prevents ImportError at checkpoint load time)
- Wrap graph_tool, pyemd, pygsp, dist_helper imports in try/except
across spectre_utils, molecular_metrics, train_metrics (these are
only needed for training metrics, not inference)
- Fix pandas deprecation in COINs load_graph.py (iteritems -> items,
to_frame column naming)
Implement COINs predict endpoint
Andrej Janchevski
3ad32ba
Fixes
Andrej Janchevski
df10af3
Implement backend discovery endpoints
Andrej Janchevski
4f1e196
Handle checkpoints
Andrej Janchevski
7f78dbf
Initial commit - add source files from research repos