r/OpenSourceeAI • u/Lazy_Eggplant8795 • 1h ago
aidflow: Open-source Python framework for deterministic, auditable credit scorecards
Enable HLS to view with audio, or disable this notification
I built aidflow as an open-source Python framework for credit risk modeling that exposes a deterministic pipeline endpoint an AI agent or orchestrator can call end to end, while keeping verification and sign-off outside the model.
Instead of an LLM deciding feature transforms or inventing outputs, an agent triggers the pipeline and receives structured outputs—a promoted scoring predictor, scorecard metrics, a cryptographic model signature, and transformation lineage—that can be replayed and checked independently.
Under the hood, data moves through locked stages with state/signature checks:
Raw -> Clean -> Stable -> Encoded -> ML-Ready -> Trained -> Tested -> Inference-Ready
Key parts of the setup:
- Agent endpoint with verifiable artifacts: An agent can trigger runs and collect the resulting artifact, metrics, signature, and DAG lineage, while human reviewers inspect the report and hash rather than trusting model claims.
- Pre-training temporal stability checks: Screens features for stability over time before model fitting instead of catching drift only after training.
- Structural leakage controls and OOT splits: Fits transforms on training splits, freezes them per stage, and supports chronological out-of-time evaluation rather than random splits on time-indexed data.
- Arrow spine with leaf conversions: Keeps tabular state in Arrow/Parquet structures and converts only at estimator/leaf boundaries to lower peak memory overhead on larger datasets (with Ray support for scaling out).
- Swappable estimators and portable exports: Supports switching model families (such as logistic regression, regularized linear models, and gradient-boosted trees) via config and exports a self-contained artifact (
champion.pkl,dag.py,lineage.json).
Side note: no AI generated the code. I have been building this over roughly 10 years alongside full-time credit scoring and fintech work so models and pipelines can hold up under risk-committee review and regulated audits.
Repo: https://github.com/aigensys-labs/aidflow
If you are building open-source ML or agent-driven pipelines where state tracking, reproducibility, or auditability is a priority, I would love to hear how you handle stage contracts and verification.