vouch-mlflow 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ """vouch-mlflow: sign MLflow model artifacts with Vouch Credentials.
2
+
3
+ Thin distribution wrapping vouch.integrations.mlflow. It exists so the MLflow
4
+ signing helpers can be installed and listed on their own while the
5
+ implementation stays single-sourced in the vouch-protocol package.
6
+ """
7
+
8
+ from vouch.integrations.mlflow import compute_model_digest, sign_model, verify_model
9
+
10
+ __all__ = ["sign_model", "verify_model", "compute_model_digest"]
11
+ __version__ = "0.1.0"
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.4
2
+ Name: vouch-mlflow
3
+ Version: 0.1.0
4
+ Summary: Sign MLflow model artifacts with Vouch Credentials for verifiable model lineage.
5
+ Author: Ramprasad Gaddam
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://vouch-protocol.com
8
+ Project-URL: Source, https://github.com/vouch-protocol/vouch
9
+ Keywords: mlflow,vouch,model-provenance,model-signing,verifiable-credentials,mlops
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Security :: Cryptography
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: vouch-protocol>=1.6.2
17
+ Provides-Extra: dev
18
+ Requires-Dist: pytest>=7.0; extra == "dev"
19
+
20
+ # vouch-mlflow
21
+
22
+ Sign [MLflow](https://mlflow.org/) model artifacts with
23
+ [Vouch](https://vouch-protocol.com) Credentials, so a registered model carries
24
+ verifiable lineage: who registered it, on whose authority, and a content digest
25
+ that breaks if the weights are tampered with.
26
+
27
+ This complements OpenSSF Model Signing. OMS proves an artifact is intact and
28
+ signed by a key; Vouch adds the agent and delegation dimension, which principal
29
+ or pipeline registered the model, traceable back to an accountable human.
30
+
31
+ ## Install
32
+
33
+ ```bash
34
+ pip install vouch-mlflow
35
+ ```
36
+
37
+ It has no hard dependency on MLflow. The helpers work on any file or directory
38
+ path, so they fit any artifact store.
39
+
40
+ ## Sign at registration time
41
+
42
+ ```python
43
+ from vouch import Signer
44
+ from vouch_mlflow import sign_model
45
+
46
+ signer = Signer(private_key=PRIV_JWK, did="did:web:ml.acme.com")
47
+
48
+ # After mlflow.log_model(...) wrote the model to a local path:
49
+ credential = sign_model(signer, "runs:/abc/model_local_path", name="fraud-detector")
50
+
51
+ # Attach to the run so it travels with the model:
52
+ import mlflow, json
53
+ mlflow.set_tag("vouch_credential", json.dumps(credential, separators=(",", ":")))
54
+ ```
55
+
56
+ ## Verify on load
57
+
58
+ ```python
59
+ from vouch_mlflow import verify_model
60
+
61
+ ok, passport = verify_model(model_path, credential, public_key=registrant_pubkey)
62
+ if not ok:
63
+ raise RuntimeError("Model signature invalid or weights changed since signing")
64
+ ```
65
+
66
+ `verify_model` checks both the signature and that the on-disk content still
67
+ matches the digest the credential was bound to.
68
+
69
+ ## License
70
+
71
+ Apache-2.0.
@@ -0,0 +1,5 @@
1
+ vouch_mlflow/__init__.py,sha256=amGYqdrKwTUFDxTxWIieTkRc7ZkJB7VSj2oOXEQlUlk,460
2
+ vouch_mlflow-0.1.0.dist-info/METADATA,sha256=kOXVyLY4UCLRgGrI4cKNyLZGjDbdWK9u3s5p5j91Qy8,2299
3
+ vouch_mlflow-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
4
+ vouch_mlflow-0.1.0.dist-info/top_level.txt,sha256=7ILHeAMCY20JDh6v6VXZkKpy0x2dxbDSXvfwXsgY85Y,13
5
+ vouch_mlflow-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ vouch_mlflow