engin-graph
Graph embedding + calibrated ranking over structured objects. The shared graph engine of the
engin suite — extracted from engin-pathway so that any
domain whose objects are graphs can rank candidates with an honest interval, not just metabolic
routes.
The problem it solves
Several domains have the same shape: you have many candidate structures, you can only test a few, and the thing that decides quality is often a single bad part rather than an average. Metabolic routes are tanked by one thermodynamically-uphill step. Polymers are tanked by one weak bond. A mean-pooled representation smooths exactly the signal that matters.
engin-graph gives you a message-passing embedding with min/max pooling (so the worst node
survives into the representation), a ridge head, and a split-conformal interval reusing
engin_core — so every domain in the suite speaks the same calibrated-uncertainty vocabulary.
Use it
from engin_graph import GraphRanker, best_of_k_regret, spearman
ranker = GraphRanker(d_in=5, lam=1.0, embed_seed=0)
ranker.fit(train_objects, train_labels)
ranker.calibrate(cal_objects, cal_labels, level=0.90)
scores = ranker.predict(test_objects)
lo, hi = ranker.predict_interval(test_objects)
Any object works as long as it exposes node_features() -> (n_nodes, d_in) and
graph() -> nx.Graph. That's the GraphLike protocol; pass a custom GraphFeaturizer if your
objects expose something else.
What's in it
| Piece | What it does |
|---|---|
GraphFeaturizer / GraphLike |
The protocol: domain object → node features + graph |
GCNEmbedder |
2-layer message-passing GCN, mean/max/min pooling |
ConformalRankingHead |
Ridge on the embedding + split-conformal interval |
GraphRanker |
The two composed — the usual entry point |
spearman, best_of_k_regret |
Ranking metrics, for reporting against a baseline |
Milestone status
M0. The GCN weights are random and untrained — a random-weight GCN plus a ridge head captures graph structure with zero backprop, which is enough to prove a ranking loop beats its domain baseline. This is a deliberate stand-in, not an oversight: pulling PyTorch for an untrained model would violate the suite's light-default-path rule (ADR 0002).
M1 swaps in a trained GNN on PyTorch Geometric behind an optional extra. The object-as-graph interface stays the same, so domain layers won't change.
Do not read M0 ranking numbers as a claim about real-world accuracy.
Consumers
engin-pathway— metabolic route manufacturability (stage [3])engin-materials— structure → property (planned)
License
Apache-2.0.
Metadata
Release files for engin-graph 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| engin_graph-0.1.1.tar.gz | 13.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| engin_graph-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.6 kB
Release files / engin_graph-0.1.1.tar.gz
| Download URL | engin_graph-0.1.1.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
122abbd341533212f9e7036f10fc2c3fb9a12e752bf8bcc31cfd480badcd6f99
|
|
BLAKE2b-256 checksum How to use checksums |
c91a4f11596cb13cbbc9aab5aae5f5873a98e066b6353e32e3afbee376007b7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.
Transparency logRelease files / engin_graph-0.1.1-py3-none-any.whl
| Download URL | engin_graph-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a40d2ddf54c04460dac943188b752332e3586eeadb6a4f367b7e7dff2d6c2259
|
|
BLAKE2b-256 checksum How to use checksums |
0c289f8b339dc4de251ab0d1024f35aa1c65d6fab96128b50dbc2e8360f57a3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.
Transparency log