Python gaps#
PLAN Section 5.4, rule 8: every stable C++ symbol has a Python counterpart, or it is listed here. The Python API is described in ADR 0011: The Python package (nanobind bindings and the typed layer) (ADR 0011). This page lists what the Python package does not bind, and why; each entry names the release that closes it, or “by design”. The hypergraph rows (0.3, M8b) are in their own table below.
C++ symbols without a Python counterpart#
C++ |
Python in 0.1 |
Why, and when |
|---|---|---|
|
none |
custom allocators from Python need a callback design (RMM-style); after 0.2.0 (not in 0.2.0) |
|
NumPy / |
owning device buffers matter with the CUDA plugins; after 0.2.0 (0.2.0 has device result arrays, ADR 0031) |
|
|
by design: arrays are NumPy / DLPack objects |
|
an integer handle, a CuPy / PyTorch stream, |
by design |
|
|
a sink calling Python from native threads needs care; the level covers users; after 0.2.0 (not in 0.2.0) |
|
none (reading: |
recording is for algorithm authors, who write C++ |
|
|
a zero-copy view of a graph that the next batch may reallocate needs the Array staleness rule for graphs; after 0.2.0 (not in 0.2.0) |
|
|
by design |
|
|
by design |
|
|
by design (a Python loop over single edges would be slow) |
|
|
by design (one call for any list) |
|
|
by design |
|
|
by design |
|
enumerations are strings in Python |
by design |
|
|
by design |
|
|
after 0.2.0 (not in 0.2.0) |
|
|
by design: teaching algorithms (ADR 0033) |
PLAN 5.4 features that are not in the 0.1 Python package#
Feature |
State |
When |
|---|---|---|
CUDA: |
done in 0.2 (M6a; ADR 0030, 0031): |
– |
|
inputs of another dtype or layout are converted with one copy; inputs in CUDA device memory are copied to the host once (graphs and batches are built from host arrays), and that copy is not yet subject to |
0.3 (with device-resident batches) |
Inputs that only have |
inputs in device memory are read through DLPack (CuPy, PyTorch, JAX); |
0.3 |
|
|
after 0.2.0 (not in 0.2.0) |
|
done in 0.3 (M8b): |
– |
|
|
0.4 |
|
done in 0.3 (M8b): |
– |
Hypergraph symbols without a Python counterpart (0.3, M8b)#
Every stable C++ symbol of <dyng/hypergraph/*.hpp> (frozen at M8b, ADR 0047) and the tracked
hypergraph parts of io, generators and testing has a counterpart in dyng.Hypergraph,
dyng.HyperedgeBatch, dyng.HypergraphProperties, dyng.CapacityPolicy,
dyng.HyperApplySummary, dyng.StorageStats, dyng.io, dyng.generators and dyng.testing,
except:
C++ |
Python in 0.3 |
Why, and when |
|---|---|---|
|
none: |
there is no hypergraph algorithm before M9: |
|
|
a view is invalidated by the next |
|
none |
always empty under |
|
|
by design |
|
|
by design (as |
|
|
by design |
|
int32 vertex ids only; int64 member arrays raise |
the library instantiates (int32, unweighted) and (int32, int32) only (PLAN 4.4.3) |
|
|
Python batches are host objects ( |
|
|
a streaming writer from Python is not needed by the parity or benchmark tools; after 0.3 if asked |
|
|
by design |
|
|
by design: the rows of a Python hypergraph come from the hypergraph |
|
keywords of |
by design |
|
none |
a model of the store’s trees for the store’s own tests (C++ contributors who change the store); not a user-facing oracle; by design |
|
enumerations are strings in Python |
by design |