Metadata-Version: 2.4
Name: aidflow
Version: 3.0.2
Summary: Pipeline execution framework
Author-email: AIGENSYS <info@aigensys.com>
License: # Functional Source License, Version 1.1, Apache 2.0 Future License
        
        ## Abbreviation
        FSL-1.1-Apache-2.0
        
        ## Notice
        Copyright 2026 AIGENSYS s.r.o., Ing. 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 Details 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
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# AIDflow

**Human-in-the-Loop Scorecard Orchestration for Regulated ML**

[![PyPI version](https://img.shields.io/pypi/v/aidflow.svg?color=blue)](https://pypi.org/project/aidflow/)
[![Python Version](https://img.shields.io/pypi/pyversions/aidflow.svg)](https://pypi.org/project/aidflow/)
[![License](https://img.shields.io/badge/License-Custom-informational.svg)](LICENSE)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

---

Most automated machine learning tools act as black-box wrappers—they optimize metrics in isolation while hiding the underlying logic, producing models that risk failure during regulatory scrutiny. **AIDflow is built differently.**

Designed specifically for high-stakes, highly regulated industries (**Fintech, Banking, Insurance**), AIDflow treats machine learning models not as opaque binary artifacts, but as **auditable, legal assets**. It provides a comprehensive ecosystem for scorecard development built around **Human-in-the-Loop Governance**.

---

## Core Pillars

### Absolute Micromanagement
Automation should never mean a loss of control. While AIDflow automates repetitive pipeline mechanics, every layer remains fully transparent and configurable. 
Practitioners can pause execution, inspect intermediate states, and fine-tune parameters—from raw feature ingestion and binning to final champion model selection.

### Audit-Ready Reporting
Every execution phase generates comprehensive, standardized documentation out of the box. 
AIDflow goes beyond traditional accuracy metrics ($AUC$, $Gini$) to produce full validation artifacts required by internal risk committees and external financial regulators.

### Production Scorecard Readiness
Outputs extend far beyond standard estimator binaries (`.pkl` / `.joblib`). AIDflow generates fully engineered production scorecards complete with Population Stability Index ($PSI$), 
Characteristic Stability Index ($CSI$), score transformations, and feature explainability vectors that satisfy international credit risk standards (e.g., Basel II/III, IFRS 9).

### Bridging the Governance Gap
AIDflow eliminates the friction between rapid experimental prototyping and enterprise compliance—ensuring models that perform in a Jupyter notebook transition seamlessly into compliant production environments.

---

## Quick Start

### Installation

```bash
pip install aidflow
```

### Basic Usage

Defining the Project Context (Control Plane) & Project Scope:

```python
import aidflow as aid

ctx = aid.ProjectContext()

ctx.genesis(
project      = 'test',
input_data   = 'test.csv',
target       = 'target',
yy_mm        = 'decision_date',
yy_mm_format = '%d%b%y'
)
ctx.params()
```

**Worker → Model**

Accessing worker's inputs schema → parameters & types:

```python        
ctx.workers.data_loader.inputs
```

Accessing worker's fitter options and schema → parameters & types:

```python        
ctx.workers.data_loader.fitters
```    

Executing worker with defaults → auto provided by the context:

```python        
ctx.workers.data_loader()
```

Once worker has been executed, thus its main model has been built,\
we have access to all populated attributes.

```python   
ctx.workers.data_loader.inputs.inputs
ctx.workers.data_loader.result
ctx.workers.data_loader.state
ctx.workers.data_loader.features
ctx.workers.data_loader.stats
ctx.workers.data_loader.params
ctx.workers.data_loader.fitter  # jump to chosen internal fitter
...
```

View to model report of executed worker:

```python
ctx.workers.data_loader.report.show()
```

**Model → Fitter**

Once worker has been executed, we obtain internal fitter state and its parametrization:

```python        
ctx.workers.data_loader.fitter
```

The fitted fitter provides all populated attributes.

```python        
ctx.workers.data_loader.fitter.stats
ctx.workers.data_loader.fitter.params
```

Direct choice and parametrization of internal fitter:

```python
fx  = ctx.registry.data_loader[0]
prm = dict(
flow_vars = ['target1', 'target2'],
columns_subset = ['fe1', 'fe2']
)
loader = ctx.workers.data_loader(fx_choice = fx, fx_params = prm)
```

In the experimenting phase when various targets might be under testing\
(*note that target2 must be present in the data*):

```python
cfg = dict(
target = 'target2',
)
woe =  ctx.workers.data_loader(fx_config = cfg)
```