model-serving — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited model-serving (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Serving turns a saved model into a reliable, low-latency API. The concerns shift from accuracy to latency, throughput, robustness, and observability. The model artifact and its preprocessing must travel together (use the pipeline from sklearn-pipelines).
from fastapi import FastAPI
from pydantic import BaseModel
import joblib, numpy as np
app = FastAPI()
model = joblib.load("model.joblib") # full pipeline: preprocessing + estimator
class Features(BaseModel):
age: float
income: float
country: str
plan: str
@app.get("/health")
def health():
return {"status": "ok"}
@app.post("/predict")
def predict(f: Features):
import pandas as pd
X = pd.DataFrame([f.model_dump()])
proba = float(model.predict_proba(X)[0, 1])
return {"probability": proba, "label": int(proba >= 0.5)}Run: uvicorn app:app --host 0.0.0.0 --port 8000 --workers 4.
model_version) for traceability.# Export sklearn/torch model to ONNX, then serve with onnxruntime
import onnxruntime as ort
sess = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])
out = sess.run(None, {"input": X.astype(np.float32)})ONNX runtime + dynamic quantization often gives 2-4x CPU speedups. For LLMs, use vLLM/TGI rather than rolling your own.
A containerized, monitored endpoint serving the exact pipeline that model-evaluation validated and experiment-tracking registered.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.