Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
bc88d23
feat(python): require Python 3.11
mkumar73 Nov 9, 2026
4b85f64
fix(preprocessor): guard frozen output changes
mkumar73 Nov 10, 2026
e181c2c
fix(periodic): reject invalid periods
mkumar73 Nov 10, 2026
56af472
fix(serialization): resolve sklearn state typing errors
mkumar73 Nov 10, 2026
028171a
fix(inspection): report fitted feature dimensions
mkumar73 Nov 10, 2026
8e08b37
test(search): cover named-column refits
mkumar73 Nov 10, 2026
8a3a7d6
test(regression): pin fixed audit contracts
mkumar73 Nov 10, 2026
c9bd80c
docs(reproducibility): clarify upgrade precautions
mkumar73 Nov 10, 2026
0e118d3
test(layout): pin fitted block contracts
mkumar73 Nov 11, 2026
31caaa0
test(inspection): pin representation detection contracts
mkumar73 Nov 11, 2026
906956d
test(input): pin shared input routing contracts
mkumar73 Nov 11, 2026
5753421
test(config): pin normalized configuration routing contracts
mkumar73 Nov 11, 2026
6d85ae4
test(api): pin public API metadata contracts
mkumar73 Nov 11, 2026
1206af5
test(serialization): pin current-config compatibility contracts
mkumar73 Nov 11, 2026
4f285a6
feat(config): add immutable representation configuration
mkumar73 Nov 13, 2026
d665215
feat(config): normalize representation configuration inputs
mkumar73 Nov 13, 2026
5b859a7
feat(config): add path-aware representation validation
mkumar73 Nov 14, 2026
4fe3f9d
feat(config): validate representation capabilities
mkumar73 Nov 14, 2026
de7fdec
feat(config): resolve per-feature representation settings
mkumar73 Nov 14, 2026
eacfb28
feat(factory): accept resolved representation configs
mkumar73 Nov 14, 2026
13ba90a
feat(preprocessor): support structured sklearn configuration
mkumar73 Nov 14, 2026
88c2ccf
feat(config): report effective per-feature settings
mkumar73 Nov 14, 2026
8b890a7
test(config): consolidate representation compatibility contracts
mkumar73 Nov 14, 2026
1d314c5
docs(config): explain structured representation configuration
mkumar73 Nov 14, 2026
fdafd7b
feat(config): enable per-feature one-hot options
mkumar73 Nov 15, 2026
7f94deb
test(config): verify per-feature adaptive width precedence
mkumar73 Nov 15, 2026
5e8cb0a
test(config): verify feature-qualified applicability errors
mkumar73 Nov 15, 2026
0550c10
fix(serialization): round-trip typed representation configs
mkumar73 Nov 15, 2026
d5867d3
test(config): verify independent per-feature fitted state
mkumar73 Nov 15, 2026
c8c1df7
test(config): pin 2/3/5 per-feature width contract
mkumar73 Nov 15, 2026
22dbb75
test(config): verify structured cross-fitting contracts
mkumar73 Nov 16, 2026
72ec256
test(config): verify structured inputs and feature order
mkumar73 Nov 16, 2026
3d2b5e2
docs(config): demonstrate per-feature configuration lifecycle
mkumar73 Nov 16, 2026
52e9f46
refactor(compose): share read-only fitted block layout
mkumar73 Nov 16, 2026
bca971d
feat(compose): declare grouped representation capabilities
mkumar73 Nov 16, 2026
07547b2
feat(compose): add ordered feature group configuration
mkumar73 Nov 18, 2026
f2dc827
feat(compose): validate feature group conflicts before fitting
mkumar73 Nov 18, 2026
c41c3b3
feat(compose): construct ordered feature group pipelines
mkumar73 Nov 19, 2026
3ca0f4e
feat(compose): expose grouped output layout and lineage
mkumar73 Nov 19, 2026
ee44324
feat(compose): audit grouped widths in budgets and reports
mkumar73 Nov 19, 2026
a0b66df
test(compose): verify grouped cross-fitting safeguards
mkumar73 Nov 19, 2026
de8ba9e
fix(compose): report missing fitted group sources
mkumar73 Nov 19, 2026
e0f6726
fix(compose): restore grouped specs and name empty sources
mkumar73 Nov 19, 2026
1990408
docs(compose): document grouped preprocessing and widths
mkumar73 Nov 19, 2026
3fbd23d
feat(spline): add immutable penalty specifications
mkumar73 Nov 19, 2026
7050fa1
feat(spline): expose typed difference penalties
mkumar73 Nov 19, 2026
ebb1886
feat(spline): expose typed P-spline penalties
mkumar73 Nov 19, 2026
6275883
feat(spline): expose typed curvature penalties
mkumar73 Nov 20, 2026
74ba0a9
feat(spline): expose typed tensor penaltie
mkumar73 Nov 20, 2026
0bf5972
feat(extension): check typed penalty capabilitie
mkumar73 Nov 20, 2026
3212f36
feat(spline): add checksummed penalty summaries
mkumar73 Nov 20, 2026
e80b23b
docs(spline): document typed penalty conventions
mkumar73 Nov 21, 2026
2edaf48
fix: splines penalty tests
mkumar73 Nov 21, 2026
6915b2a
feat(core): add task target validation helper
mkumar73 Nov 21, 2026
302f232
feat(config): add task validation policy parameter
mkumar73 Nov 21, 2026
0d8f675
feat(core): validate task targets before fitting
mkumar73 Nov 21, 2026
c26be2c
feat(search): validate task targets before cross-validation
mkumar73 Nov 21, 2026
bd1825a
test(core): verify pipeline diagnostics before cross-fit folds
mkumar73 Nov 21, 2026
4f92de2
test(core): guard strict pipeline diagnostics before cross-fit folds
mkumar73 Nov 21, 2026
142d4cd
test(core): verify task target detection contracts
mkumar73 Nov 21, 2026
bf648e1
test(core): cover task validation policy matrix
mkumar73 Nov 21, 2026
9ee18ed
docs(core): explain task target validation
mkumar73 Nov 21, 2026
7f69b5a
test(polars): cover input and output format matrix
mkumar73 Nov 21, 2026
90c47ae
test(polars): cover structured configs and feature groups
mkumar73 Nov 21, 2026
63846dc
test(polars): qualify search and cross-fitting
mkumar73 Nov 21, 2026
92113d9
fix(compose): check Polars dependency when restoring specs
mkumar73 Nov 21, 2026
8037287
docs(polars): clarify DeepTab support boundary
mkumar73 Nov 21, 2026
3f347f3
docs(polars): document input support and pandas parity
mkumar73 Nov 21, 2026
b0060c7
feat(compose): serialize typed penalty values
mkumar73 Nov 21, 2026
98a0d87
feat(compose): include fitted metadata in specs
mkumar73 Nov 22, 2026
24a347f
test(compose): pin schema v1 legacy replay
mkumar73 Nov 22, 2026
11291ed
fix(compose): preserve legacy fingerprints across override syntax
mkumar73 Nov 22, 2026
870b367
fix(compose): reject inconsistent spec metadata
mkumar73 Nov 22, 2026
d916dc2
feat(compose): summarize fitted override settings
mkumar73 Nov 22, 2026
1b3d593
docs: explain schema spec compatibility
mkumar73 Nov 22, 2026
48574ac
fix(compose): reject unsupported estimators in specs
mkumar73 Nov 22, 2026
d7e3310
docs: document PreTab architecture boundaries
mkumar73 Nov 22, 2026
29b18c1
docs: feature in 1.1 release
mkumar73 Nov 22, 2026
42f0a2d
test: define DeepTab contract fixture schema
mkumar73 Nov 22, 2026
6e8412d
test: add DeepTab compatibility fixtures and validator
mkumar73 Nov 22, 2026
975787a
docs: refresh README and homepage for PreTab 1.1
mkumar73 Nov 23, 2026
5ddca1f
docs(api): clarify contracts and fix runnable examples
mkumar73 Nov 23, 2026
181f683
docs: fix core concepts examples and expand snippet coverage
mkumar73 Nov 23, 2026
efbde38
docs: update developer guidance and release verification
mkumar73 Nov 23, 2026
68ace01
docs: refresh tutorials, core concepts, representations, examples
mkumar73 Nov 23, 2026
0c7e443
test: include task_validation in resolved facade fields
mkumar73 Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install Poetry
run: pipx install poetry
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install Poetry
run: pipx install poetry
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install Poetry
run: pipx install poetry
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install Poetry
run: pipx install poetry
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -158,16 +158,16 @@ jobs:
run: poetry run pytest tests/ -v

minimum-deps:
name: Minimum dependencies (Python 3.10)
name: Minimum dependencies (Python 3.11)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- name: Install with minimum supported dependency series
run: >-
python -m pip install . pytest pytest-cov
python -m pip install . pytest pytest-cov 'jsonschema>=4.26,<5'
"numpy==1.24.4" "pandas==2.0.3" "scipy==1.10.1" "scikit-learn==1.6.0"
- name: Run tests
run: python -m pytest tests/ -q
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install Poetry
run: pipx install poetry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install Poetry
run: pipx install poetry
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install from TestPyPI (with retry)
run: |
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ This project adheres to [Semantic Versioning](https://semver.org/) and uses

Going forward, this file is updated automatically by `cz bump` on each release.

## Unreleased

### Removed

- Python 3.10 support. PreTab 1.1 requires Python 3.11 to 3.13
(`>=3.11,<3.14`), matching DeepTab 2.1. PreTab 1.0.0 is the final release
for Python 3.10; install `pretab<1.1` if you cannot upgrade Python. See the
[migration guidance](docs/getting_started/installation.md#python-310-migration).

## v1.0.0 (2026-09-06)

First stable release, consolidating the release-candidate cycle (`rc1`-`rc5`) below into one
Expand Down
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ embeddings) is also available as a standalone transformer. Because it speaks the
API, PreTab drops straight into `Pipeline` and `ColumnTransformer` workflows and accepts any
sklearn transformer alongside its own.

Beyond the transformers themselves, every fitted representation is self-describing: it
reports per-output-column lineage, guards supervised methods against leakage, serializes to
a portable versioned spec, and can be extended with your own representations through a
public, discoverable protocol.
Fitted preprocessors report which inputs produced each output column. PreTab warns when
supervised transformers are fitted outside a pipeline or cross-validation context. Supported
fitted state can be exported to a versioned JSON spec for restoration in the same environment.
Load specs only from trusted sources. You can also register your own representations.

See [What's new in PreTab 1.1](https://pretab.readthedocs.io/en/latest/getting_started/overview.html#whats-new-in-pretab-1-1)
for release highlights and upgrade guidance.

## Why PreTab?

Expand Down Expand Up @@ -63,16 +66,17 @@ import pandas as pd

from pretab import Preprocessor

rng = np.random.default_rng(0)
df = pd.DataFrame({
"age": np.random.randint(18, 65, size=100),
"income": np.random.normal(60_000, 15_000, size=100).astype(int),
"city": np.random.choice(["Berlin", "Munich", "Hamburg"], size=100),
"experience": np.random.randint(0, 40, size=100),
"age": rng.integers(18, 65, size=100),
"income": rng.normal(60_000, 15_000, size=100).astype(int),
"city": rng.choice(["Berlin", "Munich", "Hamburg"], size=100),
"experience": rng.integers(0, 40, size=100),
})
y = np.random.randn(100)
y = rng.standard_normal(100)

# Global strategies: PLE for numerics, integer codes for categoricals
preprocessor = Preprocessor(numerical_method="ple", categorical_method="int")
preprocessor = Preprocessor(numerical_method="ple", categorical_method="int", task="regression")

X = preprocessor.fit_transform(df, y) # single stacked array, one row per sample

Expand Down Expand Up @@ -175,11 +179,14 @@ pip install pretab
```bash
pip install "pretab[embeddings]" # adds sentence-transformers, for the `pretrained` strategy
pip install "pretab[lightgbm]" # adds lightgbm, for placement_strategy="lightgbm"
pip install "pretab[all]" # both of the above
pip install "pretab[polars]" # adds Polars for eager DataFrame input
pip install "pretab[all]" # all three extras
```

> **Note:** The core install has no heavy dependencies. Each extra is opt-in and only
> needed if you use the corresponding strategy. PreTab requires Python 3.10 to 3.13.
> needed if you use the corresponding strategy. PreTab 1.1 requires Python 3.11 to 3.13.
> Python 3.10 users must stay on `pretab<1.1`; see the
> [migration guidance](docs/getting_started/installation.md#python-310-migration).

**From source:**

Expand All @@ -204,29 +211,22 @@ preprocessor = Preprocessor(
feature_preprocessing={
"age": "ple",
"income": "rbf",
"experience": "quantile",
"experience": {"method": "quantile", "params": {"n_quantiles": len(df)}},
"city": "one-hot",
},
task="regression",
)

X_array = preprocessor.fit_transform(df, y) # single stacked ndarray
X_dict = preprocessor.transform(df, return_array=False) # {"num_age": ..., "cat_city": ...}
X_array = preprocessor.fit_transform(df, y)
X_dict = preprocessor.transform(df, return_array=False)

preprocessor.get_feature_info(verbose=True) # inspect resolved strategies
assert X_array.shape == (100, 18)
assert X_dict["cat_city"].shape == (100, 3)
assert len(preprocessor.get_feature_lineage()) == X_array.shape[1]
```

`get_feature_info(verbose=True)` prints the resolved layout so you can confirm every column
at a glance:

```text
feature kind pipeline dim cats
-------------------------------------------------------------------
age numerical imputer -> minmax -> ple 7 -
income numerical imputer -> minmax -> rbf 7 -
experience numerical imputer -> minmax -> quantile 1 -
city categorical imputer -> onehot -> to_float 3 3
```
The three cities produce three one-hot columns. `get_feature_lineage()` maps each output
column back to its source feature and representation.

> **Note:** `transform` returns a single stacked array by default, so a `Preprocessor` drops
> straight into a plain `sklearn.pipeline.Pipeline`. Pass `output_structure="blocks"` (or
Expand Down
Loading
Loading