Instructions to use SZLHOLDINGS/szl-provctl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use SZLHOLDINGS/szl-provctl with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("SZLHOLDINGS/szl-provctl") - Notebooks
- Google Colab
- Kaggle
Bound interoperability claims to tested behavior
#2
by betterwithage - opened
README.md
CHANGED
|
@@ -11,7 +11,7 @@ library_name: kernels
|
|
| 11 |
license: apache-2.0
|
| 12 |
szl-governance:
|
| 13 |
verdict: INTEROP-PROVENANCE
|
| 14 |
-
interop: "in-toto Statement v1 + SLSA provenance v1 —
|
| 15 |
lambda: "Conjecture 1 (open) — proven_trust structurally locked False"
|
| 16 |
energy: "MEASURED-only — real NVML per-kernel delta; None when no GPU, never fabricated"
|
| 17 |
honest_blocked: "BLOCKED nodes are surfaced in the provenance DAG, never silently dropped"
|
|
@@ -19,9 +19,16 @@ szl-governance:
|
|
| 19 |
|
| 20 |
# szl-provctl — provenance-DAG control + supply-chain interop
|
| 21 |
|
| 22 |
-
**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
> Part of the [`szl-kernels`](https://huggingface.co/SZLHOLDINGS/szl-kernels) governed-kernel series. Where [`szl-govsign`](https://huggingface.co/SZLHOLDINGS/szl-govsign) *signs* a verdict and [`szl-blocked`](https://huggingface.co/SZLHOLDINGS/szl-blocked) *records a refusal*, `szl-provctl`
|
| 25 |
|
| 26 |
## Quickstart
|
| 27 |
|
|
@@ -40,7 +47,7 @@ print(pc.selfcheck()["ok"]) # True — 23 checks: interop shapes, DAG verify/t
|
|
| 40 |
chain = pc.UnifiedReceiptChain()
|
| 41 |
chain.emit("governed_norm", "rms_norm", {"in_shape": [4, 64], "eps": 1e-6})
|
| 42 |
|
| 43 |
-
# 1) Interop —
|
| 44 |
stmt = pc.statement_from_chain(chain, lambda_score=0.9, decision="ALLOWED")
|
| 45 |
assert stmt["_type"] == "https://in-toto.io/Statement/v1"
|
| 46 |
assert stmt["subject"][0]["digest"]["sha3_256"] == chain.head() # bound to the chain head
|
|
@@ -67,15 +74,15 @@ r = pc.measure_kernel_energy(chain, lambda x: x * 2, kernel="governed_norm", op=
|
|
| 67 |
print(r["receipt"]["attrs"]["label"], r["receipt"]["attrs"]["joules"])
|
| 68 |
```
|
| 69 |
|
| 70 |
-
## Three
|
| 71 |
|
| 72 |
-
1. **Interop
|
| 73 |
-
2. **Provenance-DAG traversal
|
| 74 |
3. **Per-kernel MEASURED energy.** `measure_kernel_energy(...)` reads the **real NVML cumulative-energy counter delta** around a *single* kernel call and writes a receipt naming the exact kernel/op measured — energy bound to kernel identity. No GPU/NVML → `joules=None`, `UNAVAILABLE_NO_NVML`. **Never fabricated.**
|
| 75 |
|
| 76 |
## What it proves — and what it does NOT
|
| 77 |
|
| 78 |
-
- ✅ The in-toto/SLSA
|
| 79 |
- ❌ It does **NOT** prove Λ uniqueness — `proven_trust` is **structurally locked `False`** (no code path sets it True). Λ = **Conjecture 1 (OPEN)**, advisory only.
|
| 80 |
- ❌ It does **NOT** fabricate energy — a non-`MEASURED` joule value is **rejected at build time**.
|
| 81 |
- The hash-chain digest is an **integrity fingerprint**, not a signature; signing is `szl-govsign`'s job (DSSE / Sigstore, out of band).
|
|
|
|
| 11 |
license: apache-2.0
|
| 12 |
szl-governance:
|
| 13 |
verdict: INTEROP-PROVENANCE
|
| 14 |
+
interop: "in-toto Statement v1 + SLSA provenance v1 shapes — repository-selfchecked; external compatibility must be tested"
|
| 15 |
lambda: "Conjecture 1 (open) — proven_trust structurally locked False"
|
| 16 |
energy: "MEASURED-only — real NVML per-kernel delta; None when no GPU, never fabricated"
|
| 17 |
honest_blocked: "BLOCKED nodes are surfaced in the provenance DAG, never silently dropped"
|
|
|
|
| 19 |
|
| 20 |
# szl-provctl — provenance-DAG control + supply-chain interop
|
| 21 |
|
| 22 |
+
**A provenance-DAG and supply-chain interoperability kernel.** `szl-provctl`
|
| 23 |
+
emits declared in-toto Statement v1 and SLSA provenance v1 shapes, walks an ML
|
| 24 |
+
provenance DAG and checks its recorded edges, and can bind a per-kernel NVML
|
| 25 |
+
energy observation to a signable provenance chain. It converts a
|
| 26 |
+
[`szl-kernels`](https://huggingface.co/SZLHOLDINGS/szl-kernels)
|
| 27 |
+
`UnifiedReceiptChain` into these documented forms. No exhaustive ecosystem or
|
| 28 |
+
novelty claim is made; compatibility with a particular external verifier must
|
| 29 |
+
be tested separately.
|
| 30 |
|
| 31 |
+
> Part of the [`szl-kernels`](https://huggingface.co/SZLHOLDINGS/szl-kernels) governed-kernel series. Where [`szl-govsign`](https://huggingface.co/SZLHOLDINGS/szl-govsign) *signs* a verdict and [`szl-blocked`](https://huggingface.co/SZLHOLDINGS/szl-blocked) *records a refusal*, `szl-provctl` serializes a governed run into documented attestation shapes and provides an offline DAG verifier for the records it produces.
|
| 32 |
|
| 33 |
## Quickstart
|
| 34 |
|
|
|
|
| 47 |
chain = pc.UnifiedReceiptChain()
|
| 48 |
chain.emit("governed_norm", "rms_norm", {"in_shape": [4, 64], "eps": 1e-6})
|
| 49 |
|
| 50 |
+
# 1) Interop — documented payload shapes for compatibility testing
|
| 51 |
stmt = pc.statement_from_chain(chain, lambda_score=0.9, decision="ALLOWED")
|
| 52 |
assert stmt["_type"] == "https://in-toto.io/Statement/v1"
|
| 53 |
assert stmt["subject"][0]["digest"]["sha3_256"] == chain.head() # bound to the chain head
|
|
|
|
| 74 |
print(r["receipt"]["attrs"]["label"], r["receipt"]["attrs"]["joules"])
|
| 75 |
```
|
| 76 |
|
| 77 |
+
## Three implemented capabilities
|
| 78 |
|
| 79 |
+
1. **Interop shapes.** `statement_from_chain(...)` emits a declared **in-toto v1 Statement** (`https://in-toto.io/Statement/v1`) whose `subject` digest is the chain head and whose `predicateType` is the governance predicate. `slsa_statement(...)` emits a declared **SLSA v1.0 provenance** predicate (`https://slsa.dev/provenance/v1`). The repository selfcheck covers required fields and bindings; validate against your chosen external verifier before production use.
|
| 80 |
+
2. **Provenance-DAG traversal.** `ProvenanceDAG.verify_dag()` topologically resolves the graph, verifies **each** chain's internal hash-chain and **each** recorded edge's asserted dependency head, and returns the first break. **honest-BLOCKED nodes are surfaced, never dropped.** This is verification of the supplied records, not independent proof that omitted events never occurred.
|
| 81 |
3. **Per-kernel MEASURED energy.** `measure_kernel_energy(...)` reads the **real NVML cumulative-energy counter delta** around a *single* kernel call and writes a receipt naming the exact kernel/op measured — energy bound to kernel identity. No GPU/NVML → `joules=None`, `UNAVAILABLE_NO_NVML`. **Never fabricated.**
|
| 82 |
|
| 83 |
## What it proves — and what it does NOT
|
| 84 |
|
| 85 |
+
- ✅ The repository selfcheck validates the documented in-toto/SLSA field shapes and chain-head bindings. External signer/verifier compatibility is **not** claimed until tested with that implementation.
|
| 86 |
- ❌ It does **NOT** prove Λ uniqueness — `proven_trust` is **structurally locked `False`** (no code path sets it True). Λ = **Conjecture 1 (OPEN)**, advisory only.
|
| 87 |
- ❌ It does **NOT** fabricate energy — a non-`MEASURED` joule value is **rejected at build time**.
|
| 88 |
- The hash-chain digest is an **integrity fingerprint**, not a signature; signing is `szl-govsign`'s job (DSSE / Sigstore, out of band).
|