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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file engin_graph-0.1.1.tar.gz.
File metadata
- Download URL: engin_graph-0.1.1.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
122abbd341533212f9e7036f10fc2c3fb9a12e752bf8bcc31cfd480badcd6f99
|
|
| MD5 |
e93d8a646ded3140fc49eb78e5c89fe5
|
|
| BLAKE2b-256 |
c91a4f11596cb13cbbc9aab5aae5f5873a98e066b6353e32e3afbee376007b7a
|
Provenance
The following attestation bundles were made for engin_graph-0.1.1.tar.gz:
Publisher:
release.yml on enginbio/engin-suite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
engin_graph-0.1.1.tar.gz -
Subject digest:
122abbd341533212f9e7036f10fc2c3fb9a12e752bf8bcc31cfd480badcd6f99 - Sigstore transparency entry: 2559223314
- Sigstore integration time:
-
Permalink:
enginbio/engin-suite@87173621d8d0fee3e09073ff2f07622e61efde39 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/enginbio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@87173621d8d0fee3e09073ff2f07622e61efde39 -
Trigger Event:
push
-
Statement type:
File details
Details for the file engin_graph-0.1.1-py3-none-any.whl.
File metadata
- Download URL: engin_graph-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a40d2ddf54c04460dac943188b752332e3586eeadb6a4f367b7e7dff2d6c2259
|
|
| MD5 |
5510df5ae1bfdf6fa55c39452947bcd8
|
|
| BLAKE2b-256 |
0c289f8b339dc4de251ab0d1024f35aa1c65d6fab96128b50dbc2e8360f57a3e
|
Provenance
The following attestation bundles were made for engin_graph-0.1.1-py3-none-any.whl:
Publisher:
release.yml on enginbio/engin-suite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
engin_graph-0.1.1-py3-none-any.whl -
Subject digest:
a40d2ddf54c04460dac943188b752332e3586eeadb6a4f367b7e7dff2d6c2259 - Sigstore transparency entry: 2559224061
- Sigstore integration time:
-
Permalink:
enginbio/engin-suite@87173621d8d0fee3e09073ff2f07622e61efde39 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/enginbio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@87173621d8d0fee3e09073ff2f07622e61efde39 -
Trigger Event:
push
-
Statement type: