Tabular Classification
Kernels
Joblib
Scikit-learn
kernel
governance
formulas
proof-status
lean4
lambda-aggregate
surrogate
doi:10.5281/zenodo.19944926
Instructions to use SZLHOLDINGS/szl-formulas with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use SZLHOLDINGS/szl-formulas with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("SZLHOLDINGS/szl-formulas") - Scikit-learn
How to use SZLHOLDINGS/szl-formulas with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("SZLHOLDINGS/szl-formulas", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
fix: make receipt evaluation portable
Browse filesCopy the complete repository into the isolated re-forge directory so packaged kernels and doctrine inputs resolve on fresh checkouts. Avoid privileged symlinks and non-ASCII status output on Windows.
- scripts/eval.py +6 -8
scripts/eval.py
CHANGED
|
@@ -12,16 +12,14 @@ want = receipt["model"]["sha256"]
|
|
| 12 |
print(f"model.joblib sha256 {'MATCHES receipt' if got==want else 'MISMATCH — refuse'}: {got[:16]}…")
|
| 13 |
if got != want: sys.exit(1)
|
| 14 |
with tempfile.TemporaryDirectory() as td:
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
out = subprocess.run([sys.executable, f"{td}/repo/scripts/forge.py"],
|
| 20 |
-
capture_output=True, text=True)
|
| 21 |
print(out.stdout[-500:] if out.returncode == 0 else out.stderr[-500:])
|
| 22 |
if out.returncode: sys.exit(1)
|
| 23 |
-
re_receipt = json.load(open(f"{
|
| 24 |
d = abs(re_receipt["metrics_MEASURED"]["test_accuracy_21_class"]
|
| 25 |
- receipt["metrics_MEASURED"]["test_accuracy_21_class"])
|
| 26 |
-
print(f"re-measured 21-class accuracy delta vs receipt: {d:.4f} ({'OK
|
| 27 |
sys.exit(0 if d <= 0.02 else 1)
|
|
|
|
| 12 |
print(f"model.joblib sha256 {'MATCHES receipt' if got==want else 'MISMATCH — refuse'}: {got[:16]}…")
|
| 13 |
if got != want: sys.exit(1)
|
| 14 |
with tempfile.TemporaryDirectory() as td:
|
| 15 |
+
copy = f"{td}/repo"
|
| 16 |
+
shutil.copytree(root, copy, ignore=shutil.ignore_patterns(".cache"))
|
| 17 |
+
out = subprocess.run([sys.executable, f"{copy}/scripts/forge.py"],
|
| 18 |
+
capture_output=True, text=True, cwd=copy)
|
|
|
|
|
|
|
| 19 |
print(out.stdout[-500:] if out.returncode == 0 else out.stderr[-500:])
|
| 20 |
if out.returncode: sys.exit(1)
|
| 21 |
+
re_receipt = json.load(open(f"{copy}/scripts/TRAINING_RECEIPT.json"))
|
| 22 |
d = abs(re_receipt["metrics_MEASURED"]["test_accuracy_21_class"]
|
| 23 |
- receipt["metrics_MEASURED"]["test_accuracy_21_class"])
|
| 24 |
+
print(f"re-measured 21-class accuracy delta vs receipt: {d:.4f} ({'OK <=0.02' if d<=0.02 else 'FAIL'})")
|
| 25 |
sys.exit(0 if d <= 0.02 else 1)
|