predikit 0.4.6__tar.gz → 0.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- predikit-0.5.1/.claude/settings.local.json +34 -0
- {predikit-0.4.6 → predikit-0.5.1}/.github/ISSUE_TEMPLATE/bug_report.md +38 -38
- {predikit-0.4.6 → predikit-0.5.1}/.github/ISSUE_TEMPLATE/feature_request.md +20 -20
- {predikit-0.4.6 → predikit-0.5.1}/.github/workflows/publish.yml +31 -31
- {predikit-0.4.6 → predikit-0.5.1}/.github/workflows/test.yml +51 -51
- {predikit-0.4.6 → predikit-0.5.1}/.gitignore +8 -8
- {predikit-0.4.6 → predikit-0.5.1}/.pre-commit-config.yaml +15 -15
- {predikit-0.4.6 → predikit-0.5.1}/CHANGELOG.md +69 -59
- {predikit-0.4.6 → predikit-0.5.1}/CLAUDE.md +71 -71
- {predikit-0.4.6 → predikit-0.5.1}/CONTRIBUTING.md +66 -66
- {predikit-0.4.6 → predikit-0.5.1}/LICENSE +21 -21
- {predikit-0.4.6 → predikit-0.5.1}/PKG-INFO +1 -1
- {predikit-0.4.6 → predikit-0.5.1}/examples/01_basic_sklearn.py +48 -48
- {predikit-0.4.6 → predikit-0.5.1}/examples/02_xgboost_regression.py +57 -57
- {predikit-0.4.6 → predikit-0.5.1}/examples/03_orlando_real_estate.py +127 -127
- {predikit-0.4.6 → predikit-0.5.1}/examples/04_confidence_routing.py +106 -106
- {predikit-0.4.6 → predikit-0.5.1}/examples/05_multi_model_ensemble.py +182 -182
- {predikit-0.4.6 → predikit-0.5.1}/examples/06_mlflow_loader.py +99 -99
- {predikit-0.4.6 → predikit-0.5.1}/examples/07_snowflake_loader.py +102 -102
- {predikit-0.4.6 → predikit-0.5.1}/pyproject.toml +88 -88
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/__init__.py +7 -7
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/cli.py +89 -89
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/coerce.py +52 -52
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/ensemble.py +121 -121
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/exceptions.py +2 -2
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/exporters/langchain.py +31 -27
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/exporters/openai.py +22 -22
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/introspect.py +20 -20
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/loaders/__init__.py +4 -4
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/loaders/mlflow.py +95 -95
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/loaders/snowflake.py +107 -86
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/registry.py +40 -40
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/tool.py +190 -179
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_cli.py +98 -98
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_coerce.py +57 -57
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_confidence.py +134 -105
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_ensemble.py +189 -189
- predikit-0.5.1/tests/test_exporters_langchain.py +68 -0
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_exporters_openai.py +42 -42
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_introspect.py +31 -31
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_loaders_mlflow.py +202 -202
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_loaders_snowflake.py +236 -196
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_logging.py +39 -39
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_registry.py +89 -89
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_tool.py +120 -120
- {predikit-0.4.6 → predikit-0.5.1}/tests/test_weighted_ensemble.py +176 -176
- {predikit-0.4.6 → predikit-0.5.1}/uv.lock +1 -1
- predikit-0.4.6/.claude/settings.local.json +0 -15
- {predikit-0.4.6 → predikit-0.5.1}/README.md +0 -0
- {predikit-0.4.6 → predikit-0.5.1}/docs/logo.gif +0 -0
- {predikit-0.4.6 → predikit-0.5.1}/docs/logo.png +0 -0
- {predikit-0.4.6 → predikit-0.5.1}/src/predikit/exporters/__init__.py +0 -0
- {predikit-0.4.6 → predikit-0.5.1}/tests/__init__.py +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(git add *)",
|
|
5
|
+
"Bash(git commit -m ' *)",
|
|
6
|
+
"Bash(python -m pytest tests/ -v --tb=short --cov=src/predikit --cov-report=term-missing)",
|
|
7
|
+
"WebFetch(domain:github.com)",
|
|
8
|
+
"PowerShell(python -m pip install mypy -q)",
|
|
9
|
+
"PowerShell(python -m mypy src/predikit)",
|
|
10
|
+
"Bash(python -m pytest --tb=short -q)",
|
|
11
|
+
"Bash(uv run *)",
|
|
12
|
+
"PowerShell(C:\\\\AI\\\\predikit\\\\.venv\\\\Scripts\\\\python.exe -m ensurepip --upgrade)",
|
|
13
|
+
"Bash(gh issue *)",
|
|
14
|
+
"Bash(gh pr *)",
|
|
15
|
+
"PowerShell(gh issue list --state open --limit 30 2>&1)",
|
|
16
|
+
"PowerShell(gh pr list --state open --limit 30 2>&1)",
|
|
17
|
+
"Bash(sed -n '/Roadmap/,/^---/p' README.md | head -80)",
|
|
18
|
+
"Bash(python -c \"import langchain_core; print\\(langchain_core.__version__\\)\")",
|
|
19
|
+
"Bash(pip show *)",
|
|
20
|
+
"Bash(./.venv/Scripts/python.exe -c \"import langchain_core; print\\(langchain_core.__version__\\)\")",
|
|
21
|
+
"Bash(./.venv/Scripts/python.exe -m pytest --version)",
|
|
22
|
+
"Bash(./.venv/Scripts/python.exe -c ' *)",
|
|
23
|
+
"Bash(./.venv/Scripts/python.exe -m pytest --cov=src/predikit --cov-report=term-missing -q)",
|
|
24
|
+
"Bash(./.venv/Scripts/python.exe -m ruff check src/ tests/)",
|
|
25
|
+
"Bash(./.venv/Scripts/python.exe -m ruff format --check src/ tests/)",
|
|
26
|
+
"Bash(./.venv/Scripts/python.exe -m mypy src/predikit)",
|
|
27
|
+
"Bash(git stash *)",
|
|
28
|
+
"Bash(./.venv/Scripts/python.exe -m pytest -q)"
|
|
29
|
+
],
|
|
30
|
+
"additionalDirectories": [
|
|
31
|
+
"C:\\AI\\predikit"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Describe the bug**
|
|
11
|
-
A clear and concise description of what the bug is.
|
|
12
|
-
|
|
13
|
-
**To Reproduce**
|
|
14
|
-
Steps to reproduce the behavior:
|
|
15
|
-
1. Go to '...'
|
|
16
|
-
2. Click on '....'
|
|
17
|
-
3. Scroll down to '....'
|
|
18
|
-
4. See error
|
|
19
|
-
|
|
20
|
-
**Expected behavior**
|
|
21
|
-
A clear and concise description of what you expected to happen.
|
|
22
|
-
|
|
23
|
-
**Screenshots**
|
|
24
|
-
If applicable, add screenshots to help explain your problem.
|
|
25
|
-
|
|
26
|
-
**Desktop (please complete the following information):**
|
|
27
|
-
- OS: [e.g. iOS]
|
|
28
|
-
- Browser [e.g. chrome, safari]
|
|
29
|
-
- Version [e.g. 22]
|
|
30
|
-
|
|
31
|
-
**Smartphone (please complete the following information):**
|
|
32
|
-
- Device: [e.g. iPhone6]
|
|
33
|
-
- OS: [e.g. iOS8.1]
|
|
34
|
-
- Browser [e.g. stock browser, safari]
|
|
35
|
-
- Version [e.g. 22]
|
|
36
|
-
|
|
37
|
-
**Additional context**
|
|
38
|
-
Add any other context about the problem here.
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Desktop (please complete the following information):**
|
|
27
|
+
- OS: [e.g. iOS]
|
|
28
|
+
- Browser [e.g. chrome, safari]
|
|
29
|
+
- Version [e.g. 22]
|
|
30
|
+
|
|
31
|
+
**Smartphone (please complete the following information):**
|
|
32
|
+
- Device: [e.g. iPhone6]
|
|
33
|
+
- OS: [e.g. iOS8.1]
|
|
34
|
+
- Browser [e.g. stock browser, safari]
|
|
35
|
+
- Version [e.g. 22]
|
|
36
|
+
|
|
37
|
+
**Additional context**
|
|
38
|
+
Add any other context about the problem here.
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature request
|
|
3
|
-
about: Suggest an idea for this project
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Is your feature request related to a problem? Please describe.**
|
|
11
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
-
|
|
13
|
-
**Describe the solution you'd like**
|
|
14
|
-
A clear and concise description of what you want to happen.
|
|
15
|
-
|
|
16
|
-
**Describe alternatives you've considered**
|
|
17
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
-
|
|
19
|
-
**Additional context**
|
|
20
|
-
Add any other context or screenshots about the feature request here.
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
name: Publish to PyPI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [published]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: read
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
publish:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
environment: pypi
|
|
14
|
-
permissions:
|
|
15
|
-
contents: read
|
|
16
|
-
id-token: write
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v4
|
|
20
|
-
|
|
21
|
-
- uses: actions/setup-python@v5
|
|
22
|
-
with:
|
|
23
|
-
python-version: "3.12"
|
|
24
|
-
|
|
25
|
-
- name: Build
|
|
26
|
-
run: |
|
|
27
|
-
pip install hatchling
|
|
28
|
-
python -m hatchling build
|
|
29
|
-
|
|
30
|
-
- name: Publish to PyPI
|
|
31
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
environment: pypi
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
id-token: write
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
|
|
25
|
+
- name: Build
|
|
26
|
+
run: |
|
|
27
|
+
pip install hatchling
|
|
28
|
+
python -m hatchling build
|
|
29
|
+
|
|
30
|
+
- name: Publish to PyPI
|
|
31
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
name: Test
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main]
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
lint:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v4
|
|
17
|
-
|
|
18
|
-
- uses: actions/setup-python@v5
|
|
19
|
-
with:
|
|
20
|
-
python-version: "3.12"
|
|
21
|
-
|
|
22
|
-
- name: Install dev dependencies
|
|
23
|
-
run: pip install -e ".[dev]"
|
|
24
|
-
|
|
25
|
-
- name: Ruff lint
|
|
26
|
-
run: ruff check src/ tests/
|
|
27
|
-
|
|
28
|
-
- name: Ruff format check
|
|
29
|
-
run: ruff format --check src/ tests/
|
|
30
|
-
|
|
31
|
-
- name: Mypy
|
|
32
|
-
run: mypy src/predikit
|
|
33
|
-
|
|
34
|
-
test:
|
|
35
|
-
runs-on: ubuntu-latest
|
|
36
|
-
strategy:
|
|
37
|
-
matrix:
|
|
38
|
-
python-version: ["3.10", "3.11", "3.12"]
|
|
39
|
-
|
|
40
|
-
steps:
|
|
41
|
-
- uses: actions/checkout@v4
|
|
42
|
-
|
|
43
|
-
- uses: actions/setup-python@v5
|
|
44
|
-
with:
|
|
45
|
-
python-version: ${{ matrix.python-version }}
|
|
46
|
-
|
|
47
|
-
- name: Install dependencies
|
|
48
|
-
run: pip install -e ".[dev]"
|
|
49
|
-
|
|
50
|
-
- name: Run tests
|
|
51
|
-
run: pytest --cov=src/predikit --cov-report=term-missing
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
|
|
22
|
+
- name: Install dev dependencies
|
|
23
|
+
run: pip install -e ".[dev]"
|
|
24
|
+
|
|
25
|
+
- name: Ruff lint
|
|
26
|
+
run: ruff check src/ tests/
|
|
27
|
+
|
|
28
|
+
- name: Ruff format check
|
|
29
|
+
run: ruff format --check src/ tests/
|
|
30
|
+
|
|
31
|
+
- name: Mypy
|
|
32
|
+
run: mypy src/predikit
|
|
33
|
+
|
|
34
|
+
test:
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
strategy:
|
|
37
|
+
matrix:
|
|
38
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
39
|
+
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: ${{ matrix.python-version }}
|
|
46
|
+
|
|
47
|
+
- name: Install dependencies
|
|
48
|
+
run: pip install -e ".[dev]"
|
|
49
|
+
|
|
50
|
+
- name: Run tests
|
|
51
|
+
run: pytest --cov=src/predikit --cov-report=term-missing
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
__pycache__/
|
|
2
|
-
*.py[cod]
|
|
3
|
-
*.egg-info/
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.egg-info/
|
|
4
4
|
dist/
|
|
5
5
|
build/
|
|
6
6
|
mlruns/
|
|
7
7
|
.coverage
|
|
8
8
|
coverage.xml
|
|
9
|
-
htmlcov/
|
|
10
|
-
.pytest_cache/
|
|
11
|
-
.venv/
|
|
12
|
-
venv/
|
|
13
|
-
*.egg
|
|
9
|
+
htmlcov/
|
|
10
|
+
.pytest_cache/
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
*.egg
|
|
14
14
|
file.py
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
repos:
|
|
2
|
-
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
-
rev: v0.5.0
|
|
4
|
-
hooks:
|
|
5
|
-
- id: ruff
|
|
6
|
-
args: [--fix]
|
|
7
|
-
- id: ruff-format
|
|
8
|
-
|
|
9
|
-
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
10
|
-
rev: v1.10.0
|
|
11
|
-
hooks:
|
|
12
|
-
- id: mypy
|
|
13
|
-
additional_dependencies:
|
|
14
|
-
- pydantic>=2.0
|
|
15
|
-
- numpy>=1.24
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.5.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
10
|
+
rev: v1.10.0
|
|
11
|
+
hooks:
|
|
12
|
+
- id: mypy
|
|
13
|
+
additional_dependencies:
|
|
14
|
+
- pydantic>=2.0
|
|
15
|
+
- numpy>=1.24
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
## [0.
|
|
9
|
+
## [0.5.1] - 2026-07-21
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- Test coverage for the LangChain exporter (`test_exporters_langchain.py`) — previously untested
|
|
13
|
+
- Warning when `confidence_threshold` is set on a classifier whose model has no `predict_proba` method, mirroring the existing regressor warning
|
|
14
|
+
- Test coverage for both `confidence_threshold` construction-time warnings (regressor, and classifier without `predict_proba`)
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- `to_langchain()` now wires up `ainvoke()` as the LangChain tool's `coroutine`, so async LangChain agents actually get async execution instead of silently falling back to sync
|
|
18
|
+
|
|
19
|
+
## [0.5.0] - 2026-07-01
|
|
10
20
|
|
|
11
21
|
### Fixed
|
|
12
22
|
- Improved `ModelTool` input coercion for optional scalar annotations like `float | None`, `bool | None`, `int | None`, and `str | None`
|
|
@@ -31,55 +41,55 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
31
41
|
## [0.4.4] - 2026-06-24
|
|
32
42
|
|
|
33
43
|
### Changed
|
|
34
|
-
- README overhauled: added "Why predikit?" comparison table, "Works with" ecosystem section, GitHub star/fork badges, and a shipped-vs-planned roadmap
|
|
35
|
-
- Quick start section replaces "30-second example" heading; `---` dividers added between major sections for better scanability
|
|
36
|
-
- PyPI package description updated to a more descriptive one-liner
|
|
37
|
-
- Keywords expanded: added `scikit-learn`, `tool-use`, `openai`, `langchain`, `mlops`, `ai-agents`, `pydantic`, `model-serving`
|
|
38
|
-
- Added `Documentation` URL to `[project.urls]` in `pyproject.toml`
|
|
39
|
-
- Added `Topic :: Software Development :: Libraries :: Python Modules` and `Typing :: Typed` classifiers
|
|
40
|
-
|
|
41
|
-
## [0.4.2] - 2026-06-13
|
|
42
|
-
|
|
43
|
-
### Changed
|
|
44
|
-
- Redesigned PyPI/README hero: logo, centered tagline, and badges in a unified `<p align="center">` block
|
|
45
|
-
- Tagline moved from a `##` heading to a proper descriptive paragraph
|
|
46
|
-
- Badges converted to centered HTML `<img>` links for consistent rendering on PyPI
|
|
47
|
-
- Quick code teaser repositioned directly below badges (before Table of Contents)
|
|
48
|
-
- "Field naming rule" added to Table of Contents
|
|
49
|
-
- `ainvoke()` added to `ModelTool` Core API reference table
|
|
50
|
-
- `ModelEnsemble` Core API subsection added with constructor signature and full strategy table
|
|
51
|
-
- Project Traffic / download badge moved to bottom of README
|
|
52
|
-
- Development Status classifier bumped from `3 - Alpha` to `4 - Beta` in `pyproject.toml`
|
|
53
|
-
- Removed CI test status badge from README
|
|
54
|
-
|
|
55
|
-
## [0.4.1] - 2026-06-02
|
|
56
|
-
|
|
57
|
-
### Added
|
|
58
|
-
- `ruff` (lint + format) and `mypy` (type checking) configured in `pyproject.toml`
|
|
59
|
-
- `.pre-commit-config.yaml` — ruff and mypy hooks run automatically before every commit
|
|
60
|
-
- Lint CI job in GitHub Actions — runs `ruff check`, `ruff format --check`, and `mypy` on every push and PR
|
|
61
|
-
- `CONTRIBUTING.md` — development setup, code style, and PR guidelines
|
|
62
|
-
- `CHANGELOG.md`
|
|
63
|
-
- `CLAUDE.md` — project context for Claude Code
|
|
64
|
-
|
|
65
|
-
### Changed
|
|
66
|
-
- Bumped version to `0.4.1`
|
|
67
|
-
- Added `ruff>=0.4.0`, `mypy>=1.10`, and `pre-commit>=3.0` to `[dev]` extras
|
|
68
|
-
|
|
69
|
-
## [0.4.0] - 2026-05-01
|
|
70
|
-
|
|
71
|
-
### Added
|
|
72
|
-
- `ModelEnsemble` with `weighted_mean` and `weighted_vote` strategies
|
|
73
|
-
- `ainvoke()` async wrapper on `ModelTool` (runs blocking predict in a thread pool)
|
|
74
|
-
- Verbose logging via `verbose=True` on `ModelTool`
|
|
75
|
-
- Snowflake Model Registry loader (`from_snowflake`)
|
|
76
|
-
- MLflow Model Registry loader (`from_mlflow`)
|
|
77
|
-
- `predikit inspect` CLI command
|
|
78
|
-
|
|
79
|
-
### Changed
|
|
80
|
-
- Moved to `src/` layout with hatchling build backend
|
|
81
|
-
- Upgraded Pydantic dependency to v2
|
|
82
|
-
|
|
83
|
-
## [0.3.x] and earlier
|
|
84
|
-
|
|
85
|
-
See [GitHub Releases](https://github.com/Tejas-TA/predikit/releases) for earlier history.
|
|
44
|
+
- README overhauled: added "Why predikit?" comparison table, "Works with" ecosystem section, GitHub star/fork badges, and a shipped-vs-planned roadmap
|
|
45
|
+
- Quick start section replaces "30-second example" heading; `---` dividers added between major sections for better scanability
|
|
46
|
+
- PyPI package description updated to a more descriptive one-liner
|
|
47
|
+
- Keywords expanded: added `scikit-learn`, `tool-use`, `openai`, `langchain`, `mlops`, `ai-agents`, `pydantic`, `model-serving`
|
|
48
|
+
- Added `Documentation` URL to `[project.urls]` in `pyproject.toml`
|
|
49
|
+
- Added `Topic :: Software Development :: Libraries :: Python Modules` and `Typing :: Typed` classifiers
|
|
50
|
+
|
|
51
|
+
## [0.4.2] - 2026-06-13
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
- Redesigned PyPI/README hero: logo, centered tagline, and badges in a unified `<p align="center">` block
|
|
55
|
+
- Tagline moved from a `##` heading to a proper descriptive paragraph
|
|
56
|
+
- Badges converted to centered HTML `<img>` links for consistent rendering on PyPI
|
|
57
|
+
- Quick code teaser repositioned directly below badges (before Table of Contents)
|
|
58
|
+
- "Field naming rule" added to Table of Contents
|
|
59
|
+
- `ainvoke()` added to `ModelTool` Core API reference table
|
|
60
|
+
- `ModelEnsemble` Core API subsection added with constructor signature and full strategy table
|
|
61
|
+
- Project Traffic / download badge moved to bottom of README
|
|
62
|
+
- Development Status classifier bumped from `3 - Alpha` to `4 - Beta` in `pyproject.toml`
|
|
63
|
+
- Removed CI test status badge from README
|
|
64
|
+
|
|
65
|
+
## [0.4.1] - 2026-06-02
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
- `ruff` (lint + format) and `mypy` (type checking) configured in `pyproject.toml`
|
|
69
|
+
- `.pre-commit-config.yaml` — ruff and mypy hooks run automatically before every commit
|
|
70
|
+
- Lint CI job in GitHub Actions — runs `ruff check`, `ruff format --check`, and `mypy` on every push and PR
|
|
71
|
+
- `CONTRIBUTING.md` — development setup, code style, and PR guidelines
|
|
72
|
+
- `CHANGELOG.md`
|
|
73
|
+
- `CLAUDE.md` — project context for Claude Code
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
- Bumped version to `0.4.1`
|
|
77
|
+
- Added `ruff>=0.4.0`, `mypy>=1.10`, and `pre-commit>=3.0` to `[dev]` extras
|
|
78
|
+
|
|
79
|
+
## [0.4.0] - 2026-05-01
|
|
80
|
+
|
|
81
|
+
### Added
|
|
82
|
+
- `ModelEnsemble` with `weighted_mean` and `weighted_vote` strategies
|
|
83
|
+
- `ainvoke()` async wrapper on `ModelTool` (runs blocking predict in a thread pool)
|
|
84
|
+
- Verbose logging via `verbose=True` on `ModelTool`
|
|
85
|
+
- Snowflake Model Registry loader (`from_snowflake`)
|
|
86
|
+
- MLflow Model Registry loader (`from_mlflow`)
|
|
87
|
+
- `predikit inspect` CLI command
|
|
88
|
+
|
|
89
|
+
### Changed
|
|
90
|
+
- Moved to `src/` layout with hatchling build backend
|
|
91
|
+
- Upgraded Pydantic dependency to v2
|
|
92
|
+
|
|
93
|
+
## [0.3.x] and earlier
|
|
94
|
+
|
|
95
|
+
See [GitHub Releases](https://github.com/Tejas-TA/predikit/releases) for earlier history.
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
# predikit — Claude Code context
|
|
2
|
-
|
|
3
|
-
## What this is
|
|
4
|
-
|
|
5
|
-
predikit wraps fitted scikit-learn / XGBoost models as LLM-callable tools with auto-generated JSON schemas, typed I/O via Pydantic, and first-class support for OpenAI function calling and LangChain.
|
|
6
|
-
|
|
7
|
-
## Project layout
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
src/predikit/ Core package (installed as `predikit`)
|
|
11
|
-
tool.py ModelTool — main public class
|
|
12
|
-
registry.py ToolRegistry — groups multiple tools for bulk export
|
|
13
|
-
ensemble.py ModelEnsemble — multi-model reconciliation strategies
|
|
14
|
-
exceptions.py LowConfidenceError
|
|
15
|
-
coerce.py LLM-string → Python type coercion (bool, int, float, str)
|
|
16
|
-
introspect.py Extract sklearn model metadata (feature names, task type)
|
|
17
|
-
cli.py `predikit inspect` CLI (click + joblib)
|
|
18
|
-
exporters/
|
|
19
|
-
openai.py .to_openai() — OpenAI function-calling schema
|
|
20
|
-
langchain.py .to_langchain() — LangChain StructuredTool
|
|
21
|
-
loaders/
|
|
22
|
-
mlflow.py from_mlflow() — load from MLflow Model Registry
|
|
23
|
-
snowflake.py from_snowflake() — load from Snowflake Model Registry
|
|
24
|
-
tests/ pytest suite (mirrors src/ layout)
|
|
25
|
-
examples/ Standalone usage scripts (01–07)
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Commands
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# Install for development
|
|
32
|
-
pip install -e ".[dev]"
|
|
33
|
-
|
|
34
|
-
# Run tests
|
|
35
|
-
pytest --cov=src/predikit --cov-report=term-missing
|
|
36
|
-
|
|
37
|
-
# Lint (check only)
|
|
38
|
-
ruff check src/ tests/
|
|
39
|
-
|
|
40
|
-
# Format (check only)
|
|
41
|
-
ruff format --check src/ tests/
|
|
42
|
-
|
|
43
|
-
# Lint + format (auto-fix)
|
|
44
|
-
ruff check --fix src/ tests/
|
|
45
|
-
ruff format src/ tests/
|
|
46
|
-
|
|
47
|
-
# Type check
|
|
48
|
-
mypy src/predikit
|
|
49
|
-
|
|
50
|
-
# All checks via pre-commit
|
|
51
|
-
pre-commit run --all-files
|
|
52
|
-
|
|
53
|
-
# Install pre-commit hooks
|
|
54
|
-
pre-commit install
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Key conventions
|
|
58
|
-
|
|
59
|
-
- **Public API** — `ModelTool`, `ToolRegistry`, `ModelEnsemble`, `LowConfidenceError` are all re-exported from `predikit/__init__.py`. Everything else is internal.
|
|
60
|
-
- **Optional imports** — heavy optional deps (`langchain`, `xgboost`, `mlflow`, `snowflake`) are imported inside functions/methods, never at module level, so missing extras don't break core imports.
|
|
61
|
-
- **Feature name matching** — inputs map to model features by column name (using `feature_names_in_` from sklearn), not by position. Mismatches raise a `ValueError` with a clear diff.
|
|
62
|
-
- **Bool coercion** — `coerce_value()` converts LLM strings (`"yes"`, `"true"`, `"1"`, `"on"`) to Python bools before Pydantic validation.
|
|
63
|
-
- **Async** — `ainvoke()` is a thin wrapper over `invoke()` via `loop.run_in_executor`. No async-native I/O involved.
|
|
64
|
-
- **Ensemble strategies** — `"collect"`, `"mean"`, `"vote"`, `"weighted_mean"`, `"weighted_vote"`. Weighted strategies take a `weights` list parallel to `tools`.
|
|
65
|
-
|
|
66
|
-
## Release process
|
|
67
|
-
|
|
68
|
-
1. Bump `version` in `pyproject.toml` and `__version__` in `src/predikit/__init__.py`.
|
|
69
|
-
2. Add a section to `CHANGELOG.md`.
|
|
70
|
-
3. Commit, push to `main`, create a GitHub Release with the version tag (e.g. `v0.4.1`).
|
|
71
|
-
4. `publish.yml` auto-triggers a PyPI upload via OIDC trusted publishing.
|
|
1
|
+
# predikit — Claude Code context
|
|
2
|
+
|
|
3
|
+
## What this is
|
|
4
|
+
|
|
5
|
+
predikit wraps fitted scikit-learn / XGBoost models as LLM-callable tools with auto-generated JSON schemas, typed I/O via Pydantic, and first-class support for OpenAI function calling and LangChain.
|
|
6
|
+
|
|
7
|
+
## Project layout
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
src/predikit/ Core package (installed as `predikit`)
|
|
11
|
+
tool.py ModelTool — main public class
|
|
12
|
+
registry.py ToolRegistry — groups multiple tools for bulk export
|
|
13
|
+
ensemble.py ModelEnsemble — multi-model reconciliation strategies
|
|
14
|
+
exceptions.py LowConfidenceError
|
|
15
|
+
coerce.py LLM-string → Python type coercion (bool, int, float, str)
|
|
16
|
+
introspect.py Extract sklearn model metadata (feature names, task type)
|
|
17
|
+
cli.py `predikit inspect` CLI (click + joblib)
|
|
18
|
+
exporters/
|
|
19
|
+
openai.py .to_openai() — OpenAI function-calling schema
|
|
20
|
+
langchain.py .to_langchain() — LangChain StructuredTool
|
|
21
|
+
loaders/
|
|
22
|
+
mlflow.py from_mlflow() — load from MLflow Model Registry
|
|
23
|
+
snowflake.py from_snowflake() — load from Snowflake Model Registry
|
|
24
|
+
tests/ pytest suite (mirrors src/ layout)
|
|
25
|
+
examples/ Standalone usage scripts (01–07)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Commands
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Install for development
|
|
32
|
+
pip install -e ".[dev]"
|
|
33
|
+
|
|
34
|
+
# Run tests
|
|
35
|
+
pytest --cov=src/predikit --cov-report=term-missing
|
|
36
|
+
|
|
37
|
+
# Lint (check only)
|
|
38
|
+
ruff check src/ tests/
|
|
39
|
+
|
|
40
|
+
# Format (check only)
|
|
41
|
+
ruff format --check src/ tests/
|
|
42
|
+
|
|
43
|
+
# Lint + format (auto-fix)
|
|
44
|
+
ruff check --fix src/ tests/
|
|
45
|
+
ruff format src/ tests/
|
|
46
|
+
|
|
47
|
+
# Type check
|
|
48
|
+
mypy src/predikit
|
|
49
|
+
|
|
50
|
+
# All checks via pre-commit
|
|
51
|
+
pre-commit run --all-files
|
|
52
|
+
|
|
53
|
+
# Install pre-commit hooks
|
|
54
|
+
pre-commit install
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Key conventions
|
|
58
|
+
|
|
59
|
+
- **Public API** — `ModelTool`, `ToolRegistry`, `ModelEnsemble`, `LowConfidenceError` are all re-exported from `predikit/__init__.py`. Everything else is internal.
|
|
60
|
+
- **Optional imports** — heavy optional deps (`langchain`, `xgboost`, `mlflow`, `snowflake`) are imported inside functions/methods, never at module level, so missing extras don't break core imports.
|
|
61
|
+
- **Feature name matching** — inputs map to model features by column name (using `feature_names_in_` from sklearn), not by position. Mismatches raise a `ValueError` with a clear diff.
|
|
62
|
+
- **Bool coercion** — `coerce_value()` converts LLM strings (`"yes"`, `"true"`, `"1"`, `"on"`) to Python bools before Pydantic validation.
|
|
63
|
+
- **Async** — `ainvoke()` is a thin wrapper over `invoke()` via `loop.run_in_executor`. No async-native I/O involved.
|
|
64
|
+
- **Ensemble strategies** — `"collect"`, `"mean"`, `"vote"`, `"weighted_mean"`, `"weighted_vote"`. Weighted strategies take a `weights` list parallel to `tools`.
|
|
65
|
+
|
|
66
|
+
## Release process
|
|
67
|
+
|
|
68
|
+
1. Bump `version` in `pyproject.toml` and `__version__` in `src/predikit/__init__.py`.
|
|
69
|
+
2. Add a section to `CHANGELOG.md`.
|
|
70
|
+
3. Commit, push to `main`, create a GitHub Release with the version tag (e.g. `v0.4.1`).
|
|
71
|
+
4. `publish.yml` auto-triggers a PyPI upload via OIDC trusted publishing.
|