eqdisco.mlops.ModelRegistry#
- class eqdisco.mlops.ModelRegistry(root)[source]#
Bases:
objectFile-based registry of versioned equations.
Layout:
<root>/<name>/v<k>.json(the equation and its record) and<root>/<name>/index.json.Examples
>>> import tempfile, numpy as np >>> from eqdisco import Equation >>> from eqdisco.mlops import ModelRegistry >>> reg = ModelRegistry(tempfile.mkdtemp()) >>> eq = Equation.from_string("2*x0 + 1") >>> reg.register("demo", eq, metrics={"r2": 0.99}) 1 >>> reg.promote("demo", 1, "production") >>> print(reg.load("demo", stage="production")) 2 * x0 + 1