Skip to content

Commit 8c46f3d

Browse files
committed
docs: add PreTab ref, reorder sections, add v1 vs v2 migration guidance
1 parent 7000679 commit 8c46f3d

3 files changed

Lines changed: 91 additions & 60 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
## Why DeepTab?
2525

2626
- **Familiar interface.** A scikit-learn `fit`/`predict`/`evaluate` API that drops into existing pipelines, including `GridSearchCV`.
27-
- **Automatic preprocessing.** Feature-type detection, encoding, scaling, and missing-value handling are built in.
27+
- **Automatic preprocessing.** Feature-type detection, encoding, scaling, and missing-value handling are powered by [PreTab](https://github.com/OpenTabular/PreTab) and applied for you.
2828
- **One model, three tasks.** Every architecture ships as a classifier, a regressor, and a distributional (`LSS`) variant for uncertainty quantification.
2929
- **A broad model zoo.** 15 stable architectures plus experimental models, all behind the same interface, with [selection guidance](https://deeptab.readthedocs.io/en/latest/model_zoo/index.html).
3030
- **Built for real data.** Mixed feature types, class imbalance, GPU acceleration, and early stopping work out of the box.

docs/core_concepts/config_system.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
DeepTab uses a split-config API. Architecture, preprocessing, and training settings are kept in separate dataclasses so experiments can change one layer without mixing concerns.
44

55
```{important}
6-
The model constructor accepts `model_config`, `preprocessing_config`, and `trainer_config`. Flat constructor arguments are legacy compatibility only; new documentation and experiments should use split configs.
6+
The model constructor accepts `model_config`, `preprocessing_config`, and `trainer_config`. All settings must go through these config objects; the flat constructor arguments from v1 are no longer accepted and raise a `TypeError`.
77
```
88

99
## The Three Config Layers
@@ -16,6 +16,38 @@ The model constructor accepts `model_config`, `preprocessing_config`, and `train
1616

1717
All three are optional. If omitted, DeepTab creates default config objects internally.
1818

19+
### Moving from v1
20+
21+
In v1, architecture, preprocessing, and training options were all passed as flat keyword arguments on the estimator. In v2 those same options live in three dedicated config objects. The estimator call is the only thing that changes; `fit`, `predict`, and `evaluate` behave exactly as before.
22+
23+
```python
24+
# v1: every option flat on the estimator
25+
from deeptab.models import MambularClassifier
26+
27+
model = MambularClassifier(
28+
d_model=128,
29+
n_layers=4,
30+
numerical_preprocessing="ple",
31+
lr=1e-3,
32+
)
33+
```
34+
35+
```python
36+
# v2: options grouped by concern
37+
from deeptab.models import MambularClassifier
38+
from deeptab.configs import MambularConfig, PreprocessingConfig, TrainerConfig
39+
40+
model = MambularClassifier(
41+
model_config=MambularConfig(d_model=128, n_layers=4),
42+
preprocessing_config=PreprocessingConfig(numerical_preprocessing="ple"),
43+
trainer_config=TrainerConfig(lr=1e-3),
44+
)
45+
```
46+
47+
```{tip}
48+
Each option moves to the config that owns its concern: architecture fields go to the model config, anything passed to `pretab.Preprocessor` goes to `PreprocessingConfig`, and training or optimizer fields go to `TrainerConfig`. The tables further down list which fields belong where.
49+
```
50+
1951
### Where to find every field
2052

2153
Each config has a complete, authoritative field reference. Use the table below as the index.

docs/homepage.md

Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ probabilities = model.predict_proba(X_test)
1515
## Why DeepTab
1616

1717
- **Familiar interface.** A scikit-learn `fit`/`predict`/`evaluate` API that drops into existing pipelines, including `GridSearchCV`.
18-
- **Automatic preprocessing.** Feature-type detection, encoding, scaling, and missing-value handling are built in.
18+
- **Automatic preprocessing.** Feature-type detection, encoding, scaling, and missing-value handling are powered by [PreTab](https://github.com/OpenTabular/PreTab) and applied for you.
1919
- **One model, three tasks.** Every architecture ships as a classifier, a regressor, and a distributional (`LSS`) variant for uncertainty quantification.
2020
- **A broad model zoo.** 15 stable architectures plus experimental models, all behind the same interface, with [selection guidance](model_zoo/comparison_tables).
2121
- **Built for real data.** Mixed feature types, class imbalance, GPU acceleration, and early stopping work out of the box.
@@ -30,7 +30,7 @@ DeepTab requires Python 3.10+ and installs PyTorch automatically. See [Installat
3030

3131
## What's New in v2.0
3232

33-
v2.0 is a ground-up restructuring of DeepTab. The high-level estimator API stays familiar, while the package layout, configuration objects, and import paths have moved.
33+
v2.0 is a ground-up restructuring of DeepTab. The high-level estimator API stays familiar, while the package layout, configuration objects, and import paths have been updated.
3434

3535
- **Split-config API**: separate model, preprocessing, and training configuration objects, so each concern can be tuned on its own. This is the first thing you reach for in v2.
3636
- **New models**: AutoInt, ENODE, and TabR (stable); Tangos, Trompt, and ModernNCA (experimental).
@@ -44,7 +44,49 @@ v2.0 is a ground-up restructuring of DeepTab. The high-level estimator API stays
4444
- **Rebuilt docs and tutorials**: refreshed guides plus end-to-end, Colab-ready tutorials for [classification](tutorials/imbalance_classification), [regression](tutorials/skewed_regression), and [uncertainty quantification](tutorials/uncertainty_quantification).
4545

4646
```{warning}
47-
Upgrading from v1 requires changes. Packages were reorganised, the `Default<Arch>Config` classes were renamed to `<Arch>Config`, and the data modules became `TabularDataModule` / `TabularDataset`. See the [FAQ](getting_started/faq) for v1 support and upgrade notes.
47+
**v2.0 is not backward compatible with v1, and v1 is no longer maintained.** Three
48+
things changed that affect existing code:
49+
50+
1. **Import paths** were reorganised under the `deeptab` namespace.
51+
2. **Config classes** lost their `Default` prefix, so `DefaultMambularConfig` is now
52+
`MambularConfig`. Settings are also split across `MambularConfig` (architecture),
53+
`PreprocessingConfig` (feature handling), and `TrainerConfig` (optimisation).
54+
3. **Data modules** were renamed to `TabularDataModule` and `TabularDataset`; the old
55+
`Mambular*` aliases are deprecated.
56+
57+
If you need to stay on v1 for now, pin `deeptab<2.0`. Note that the v1 branch receives
58+
no bug fixes or security updates. See the [FAQ](getting_started/faq) for the full
59+
support policy and migration notes.
60+
```
61+
62+
The high-level `fit`/`predict`/`evaluate` workflow is unchanged. In most cases only
63+
the imports and config construction need updating:
64+
65+
```python
66+
# v1: settings passed as flat keyword arguments on the estimator
67+
from deeptab.models import MambularClassifier
68+
69+
model = MambularClassifier(d_model=128, n_layers=4, numerical_preprocessing="ple")
70+
model.fit(X_train, y_train, max_epochs=50)
71+
```
72+
73+
```python
74+
# v2: settings grouped into focused config objects
75+
from deeptab.models import MambularClassifier
76+
from deeptab.configs import MambularConfig, PreprocessingConfig
77+
78+
model = MambularClassifier(
79+
model_config=MambularConfig(d_model=128, n_layers=4), # architecture
80+
preprocessing_config=PreprocessingConfig(numerical_preprocessing="ple"), # features
81+
)
82+
model.fit(X_train, y_train, max_epochs=50)
83+
```
84+
85+
```{note}
86+
You only pass the configs you want to customise. `MambularClassifier()` with no
87+
arguments uses sensible defaults for the architecture, preprocessing, and training.
88+
The flat keyword-argument style from v1 is no longer accepted, so settings must go
89+
through the relevant config object.
4890
```
4991

5092
See the [Overview](getting_started/overview) for the full picture.
@@ -59,61 +101,18 @@ Each architecture comes in three variants, `*Classifier`, `*Regressor`, and `*LS
59101

60102
## Documentation
61103

62-
### Getting Started
63-
64-
- [Overview](getting_started/overview): What DeepTab is and when to use it
65-
- [Installation](getting_started/installation): Setup, GPU support, and optional kernels
66-
- [Quickstart](getting_started/quickstart): Train your first models in a few minutes
67-
- [FAQ](getting_started/faq): Common questions and troubleshooting
68-
69-
### Core Concepts
70-
71-
- [sklearn API](core_concepts/sklearn_api): The fit/predict/evaluate interface
72-
- [Model Tiers](core_concepts/model_tiers): Stable versus experimental models
73-
- [Config System](core_concepts/config_system): Split configuration for model, preprocessing, and training
74-
- [Training and Evaluation](core_concepts/training_and_evaluation): The fit pipeline, metrics, and reproducibility
75-
- [Observability](core_concepts/observability): Lifecycle events, structured logging, and experiment tracking
76-
- [Model Operations](core_concepts/model_operations): Serialisation and inspection
77-
- [Inference](core_concepts/inference): Deployment-safe prediction with `InferenceModel`
78-
79-
### Tutorials
80-
81-
- [Imbalanced Classification](tutorials/imbalance_classification): An end-to-end classification workflow
82-
- [Skewed-Target Regression](tutorials/skewed_regression): Regression on a right-skewed target
83-
- [Uncertainty Quantification](tutorials/uncertainty_quantification): Prediction intervals with LSS models
84-
- [Hyperparameter Optimisation](tutorials/hpo): Tuning models efficiently
85-
- [Advanced Training and Inference](tutorials/advanced_training): Optimizers, schedulers, and production inference
86-
- [Observability and Logging](tutorials/observability): Run directories and experiment trackers
87-
- [Model Efficiency](tutorials/model_efficiency): Runtime and memory benchmarking
88-
- [Experimental Models](tutorials/experimental): Working with cutting-edge architectures
89-
90-
### Model Zoo
91-
92-
- [Comparison Tables](model_zoo/comparison_tables): Selection guidance and performance across dimensions
93-
- [Stable Models](model_zoo/stable/index): Production-ready architectures
94-
- [Experimental Models](model_zoo/experimental/index): Models under evaluation
95-
- [Efficiency and Benchmarking](model_zoo/efficiency): Runtime and memory guidance
96-
- [Recommended Configs](model_zoo/recommended_configs): Hyperparameter recipes
97-
98-
### API Reference
99-
100-
- [Models](api/models/index): Classifier, Regressor, and LSS classes
101-
- [Configs](api/configs/index): Configuration dataclasses
102-
- [Data](api/data/index): Datasets, data modules, and schemas
103-
- [Distributions](api/distributions/index): LSS distribution families
104-
- [Metrics](api/metrics/index): Task-aware metric classes
105-
- [Training](api/training/index): Lightning modules for advanced use
106-
107-
### Developer Guide
108-
109-
- [Contributing](developer_guide/contributing): How to contribute
110-
- [Testing](developer_guide/testing): Test suite and coverage
111-
- [Documentation](developer_guide/documentation): Building the docs locally
112-
- [Versioning](developer_guide/versioning): Semantic versioning policy
113-
- [CI/CD](developer_guide/ci_cd): Continuous integration
114-
- [Release Process](developer_guide/release): Release workflow
115-
- [Model Promotion Policy](developer_guide/model_promotion_policy): From experimental to stable
116-
- [Support Matrix](developer_guide/support_matrix): Supported Python and PyTorch versions
104+
```{note}
105+
These are starting points for each area. The sidebar navigation is the source of
106+
truth, so please review the individual documentation sections for the latest
107+
updates and further documentation.
108+
```
109+
110+
- **Getting Started**: Begin with the [Overview](getting_started/overview) and [Quickstart](getting_started/quickstart), then see [Installation](getting_started/installation) for GPU setup.
111+
- **Core Concepts**: How DeepTab works, including the [sklearn API](core_concepts/sklearn_api), the [Config System](core_concepts/config_system), and [Training and Evaluation](core_concepts/training_and_evaluation).
112+
- **Tutorials**: End-to-end, Colab-ready walkthroughs for [regression](tutorials/skewed_regression), [classification](tutorials/imbalance_classification), and [uncertainty quantification](tutorials/uncertainty_quantification).
113+
- **Model Zoo**: Browse the [Stable Models](model_zoo/stable/index) and [Experimental Models](model_zoo/experimental/index), or use the [Comparison Tables](model_zoo/comparison_tables) for selection guidance.
114+
- **API Reference**: Full reference for [Models](api/models/index), [Configs](api/configs/index), and the rest of the public API.
115+
- **Developer Guide**: [Contributing](developer_guide/contributing), [Testing](developer_guide/testing), and the [Release Process](developer_guide/release) for maintainers.
117116

118117
---
119118

0 commit comments

Comments
 (0)