Metadata-Version: 2.5
Name: aidflow
Version: 3.0.9
Summary: Automated Interactive Development Framework | Scorecard DEV
Project-URL: Homepage, https://github.com/aigensys-labs/aidflow
Project-URL: Repository, https://github.com/aigensys-labs/aidflow
Project-URL: Documentation, https://aidflow.aigensys.com/
Author-email: AIGENSYS <info@aigensys.com>, Michal Ricar <michal.ricar@aigensys.com>
License: # Functional Source License, Version 1.1, Apache 2.0 Future License
        
        ## Abbreviation
        FSL-1.1-Apache-2.0
        
        ## License Notice
        Copyright 2026 AIGENSYS s.r.o., Michal Ricar, Ph.D. and AIDflow contributors
        
        ## Terms and Conditions
        
        ### Licensor ("We")
        The party offering the Software under these Terms and Conditions.
        
        ### The Software
        The "Software" is each version of the software that we make available under these Terms and Conditions, as indicated by our inclusion of these Terms and Conditions with the Software.
        
        ### License Grant
        Subject to your compliance with this License Grant and the Patents, Redistribution and Trademark clauses below, we hereby grant you the right to use, copy, modify, create derivative works, publicly perform, publicly display and redistribute the Software for any Permitted Purpose identified below.
        
        ### Permitted Purpose
        A Permitted Purpose is any purpose other than a Competing Use. A Competing Use means making the Software available to others in a commercial product or service that:
        1. substitutes for the Software;
        2. substitutes for any other product or service we offer using the Software that exists as of the date we make the Software available; or
        3. offers the same or substantially similar functionality as the Software.
        
        Permitted Purposes specifically include using the Software:
        1. for your internal use and access;
        2. for non-commercial education;
        3. for non-commercial research; and
        4. in connection with professional services that you provide to a licensee using the Software in accordance with these Terms and Conditions.
        
        ### Patents
        To the extent your use for a Permitted Purpose would necessarily infringe our patents, the license grant above includes a license under our patents. If you make a claim against any party that the Software infringes or contributes to the infringement of any patent, then your patent license to the Software ends immediately.
        
        ### Redistribution
        The Terms and Conditions apply to all copies, modifications and derivatives of the Software.
        
        If you redistribute any copies, modifications or derivatives of the Software, you must include a copy of or a link to these Terms and Conditions and not remove any copyright notices provided in or with the Software.
        
        ### Disclaimer
        THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
        
        IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
        
        ### Trademarks
        Except for displaying the License Notice and identifying us as the origin of the Software, you have no right under these Terms and Conditions to use our trademarks, trade names, service marks or product names.
        
        ## Grant of Future License
        
        We hereby irrevocably grant you an additional license to use the Software under the Apache License, Version 2.0 that is effective on the second anniversary of the date we make the Software available. On or after that date, you may use the Software under the Apache License, Version 2.0, in which case the following will apply:
        
        > Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
        > 
        > http://www.apache.org/licenses/LICENSE-2.0
        > 
        > Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
License-File: LICENSE
Keywords: credit-scoring,feature-selection,gradient-boosting,human-in-the-loop,logistic-regression,ml-pipeline,regulatory-reporting,scorecard,woe
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: anywidget>=0.11
Requires-Dist: ipykernel>=7.4
Requires-Dist: ipywidgets>=8.1
Requires-Dist: itables>=2.9
Requires-Dist: jinja2>=3.1.6
Requires-Dist: lightgbm==4.6
Requires-Dist: matplotlib>=3.11
Requires-Dist: mgzip2>=0.2.6
Requires-Dist: multiprocess>=0.70.1
Requires-Dist: numba>=0.68
Requires-Dist: numpy>=2.5
Requires-Dist: optuna-integration[lightgbm,xgboost]
Requires-Dist: optuna>=5.0
Requires-Dist: p-tqdm>=1.4
Requires-Dist: pandas>=3.1
Requires-Dist: plotly>=7.1
Requires-Dist: pyarrow>=26.0
Requires-Dist: scikit-learn>=1.9
Requires-Dist: scipy>=1.18
Requires-Dist: shap>=0.54
Requires-Dist: statsmodels>=0.15
Requires-Dist: threadpoolctl>=3.7
Requires-Dist: tqdm>=4.7
Requires-Dist: wrapt>=2.5.2
Requires-Dist: xgboost>=3.4
Provides-Extra: all
Requires-Dist: notebook>=7.6; extra == 'all'
Requires-Dist: ray[data]>=2.59; (python_version < '3.14') and extra == 'all'
Provides-Extra: notebook
Requires-Dist: notebook>=7.6; extra == 'notebook'
Provides-Extra: ray
Requires-Dist: ray[data]>=2.59; (python_version < '3.14') and extra == 'ray'
Description-Content-Type: text/markdown

<h1 align="center">

<img src="https://raw.githubusercontent.com/aigensys-labs/aidflow/main/docs/assets/aidflow.png" alt="AIDflow" width="400">

</h1>

<div align="center">

**Automated Interactive Development Framework**<br />**Human-in-the-Loop Scorecard Orchestration for Regulated ML**

![PyPI](https://img.shields.io/pypi/v/aidflow?color=blue&cache=300)![Python](https://img.shields.io/badge/python-3.12%2B-blue)![License](https://img.shields.io/badge/License-FSL--1.1-blue)![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)

</div>

<div align="center">

*Built over 15 years of credit scoring, fintech R&D, and regulatory practice.*

<img src="https://raw.githubusercontent.com/aigensys-labs/aidflow/main/docs/assets/aidflow-preview.gif" alt="AIDflow-preview">

<br>

**A human directs. An AI agent executes. The output survives committee review.**

</div>

---

## Why AIDflow?

Automated ML tools optimize metrics in isolation and hand you a black box.
In regulated environments — **Fintech, Banking, Insurance** — that's a liability, not an asset.

AIDflow treats every model as an **auditable legal artifact**. It automates the pipeline mechanics while keeping a human in control of every decision: feature selection, binning strategy, model choice, champion deployment. Full transparency, full traceability, full reproducibility.

It is also an **AI-orchestrable endpoint** — an endpoint that lets LLM agents drive the full pipeline (genesis → training → champion) and return a deployable, regulatory-grade scorecard without human intervention.

**If your scoring model must survive a committee review, AIDflow is your development environment.**

---

## Quick Start

### Install & Run Demo

```bash
# Pure CLI
pip install aidflow
aidflow run demo/

# Interactive UI 
pip install aidflow[notebook]
aidflow notebook ui_demo/
```

### Define & Run Your Project in CLI / Notebook

```python
import aidflow as aid

# Project Context
ctx = aid.ProjectContext()

ctx.genesis(
    project      = 'my_scorecard',
    input_data   = 'data/train.csv',
    target       = 'is_churn',
    yy_mm        = 'decision_date',
    yy_mm_format = '%Y-%m-%d',
)
ctx.params(save=1, logging=1, verbose=1)

# Execute Full Pipeline
ctx.flow.process('all')

# Or Run Phase-by-Phase
ctx.flow.process('data')
ctx.flow.process('encoding')
ctx.flow.process('training')
ctx.flow.process('selection')
```

### Inference Tests

```python
pred = aid.Predictor(project='my_scorecard')
score = pred.champion_predict(new_data, preprocess=True)
```

### Export Production Artifact

```python
prod = aid.ProductionExporter(ctx.selection.champion_predictor)
prod.export_all('./production')
# → self-contained scoring module
```

---

## Documentation

📚 [**View Full Documentation → aidflow.aigensys.com**](https://aidflow.aigensys.com)

- [Getting Started](https://aidflow.aigensys.com/getting-started/overview)
- [User Guides](https://aidflow.aigensys.com/user-guides/data-phase)
- [API Reference](https://aidflow.aigensys.com/api/execution-interface/Parameters)

---

## Capabilities

- **Human-in-the-Loop** — Every phase is a decision point. Pause, inspect, re-configure, re-run — without losing state.
- **Ensemble + Selection** — Four orthogonal agents compete. An objective scoring system promotes the champion.
- **Audit-Ready** — Per-step standardized artifacts: stability indices (PSI/CSI), lift tables, calibration, feature lineage, SHAP vectors.
- **Self-Contained Scoring** — The exported artifact encapsulates all encoding and model state. Inference requires no training data or prior pipeline state.
- **Memory-Aware Relay** — Offloads intermediate state to disk via Arrow. Run pipelines on a 16GB machine. `ctx.params(offload=1)`.
- **Distributed Compute** — Swap from local multiprocessing to Ray cluster for multi-node scaling. `pip install aidflow[ray]`. No pipeline changes.

---

## Architecture

AIDflow decouples **user intent** from **mathematical execution** via a three-layer stack. Swap algorithms without touching the API.

| Layer      | Role      | Responsibility                                            |
|------------|-----------|-----------------------------------------------------------|
| **Worker** | Interface | User-facing API. Validation, state, registration, UI.     |
| **Model**  | Adapter   | Parameter resolution. Algorithm switching. Fit options.   |
| **Fitter** | Engine    | Pure computation. No UI, no context. Data in → model out. |


**Practical effect:** switch from Lasso to ElasticNet by passing one parameter. The worker API, the state schema, and the reporting pipeline remain unchanged.

---

## Traditional ML vs AIDflow

| Dimension           | Traditional                                    | AIDflow                                                                    |
|---------------------|------------------------------------------------|----------------------------------------------------------------------------|
| **Data flow**       | Variable passing (`df1` → `df2` → ... → `dfN`) | Context registration (semantic lineage)                                    |
| **Architecture**    | Monolithic script                              | Worker → Model → Fitter (swappable layers)                                 |
| **Extension**       | Rewrite the function                           | Define a new Fitter, register it. Done.                                    |
| **Stability**       | Manual checks, date slicing                    | Built-in temporal phases (pre-training)                                    |
| **Memory**          | RAM-bound. Sample or add hardware.             | Arrow offload. Runs on any machine.                                        |
| **Compute**         | `multiprocessing` or manual `joblib`           | Local multiprocessing (default) → Ray cluster (one param)                  |
| **Reproducibility** | "Works on my machine"                          | Context-locked. Run-to-run identical.                                      |
| **AI**              | Manual step-by-step orchestration              | Single-call pipeline → production DAG. Stateless, idempotent, AI-friendly. |

---

## Execution Pipeline

*GENESIS → DATA → ENCODING → TRAINING → SELECTION → INFERENCE*

|                                                                                                    |
|----------------------------------------------------------------------------------------------------|
| 📊 **Data** — Loader, Fe Cleaner, Fe Stabilizer, Obs Stabilizer                                    |
| 🔢 **Encoding** — Num Encoder, Cat Encoder, Ixn Encoder, WOE Encoder, WOE Stabilizer, Data Encoder |
| 🤖 **Training** — Agent 1 (GLM), Agent 2 (L1/L2), Agent 3 (PLS), Agent 4 (GBM)                     |
| 🏆 **Selection** — Agents Predictor, Comparator, Transition, Selector, Champion                    |
| 🎯 **Inference** — Production Predictor, Production Export                                         |

> **Human-in-the-Loop:** Interactive adjustments, pause, inspect, re-configure at every boundary

---

## Requirements

- Python **3.12+**
- [Dependencies](https://github.com/aigensys-labs/aidflow/blob/main/pyproject.toml)

---

## Licensing

**Functional Source License (FSL 1.1)** with automatic Apache 2.0 grant after 2 years.

- **Permitted**: Internal use, non-commercial education/research, professional services delivery.
- **Restricted**: Building a competing commercial product on top of AIDflow's core engine.
- **After 2 years**: Automatically converts to **Apache 2.0** (full open source, no restrictions).

[Full license → LICENSE](https://github.com/aigensys-labs/aidflow/blob/main/LICENSE) |
[Learn more → fsl.software](https://fsl.software/)

---

*Built for practitioners who build models that must survive a regulatory audit.*