Metadata-Version: 2.1
Name: scaffolded-learning
Version: 0.1.0
Summary: Multi-error / scaffolded learning models built from composable blocks.
Author-email: Sergii Serednii <sseredniy@gmail.com>
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.1
Requires-Dist: numpy>=1.21
Requires-Dist: pandas>=1.4
Requires-Dist: scikit-learn>=0.23
Requires-Dist: pyarrow>=14.0
Requires-Dist: optuna>=3.5
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"

# scaffolded-learning

PyTorch implementation of **scaffolded learning** concept: training a model on a main target together with auxiliary (scaffold) targets predicted at intermediate stages.

The package provides:

- **Building blocks** (`scaffolded_learning.blocks`): `BackboneModule`, `ScaffoldModule` and `HeadModule`.
- **Predefined models** for popular architectures:

| Model | Data | Scaffold | Output |
| --- | --- | --- | --- |
| `ScaffoldedMLPBinary` | tabular | one binary head per scaffold column | binary |
| `ScaffoldedMLPMultiClass` | tabular | one multiclass head | multiclass |
| `ScaffoldedVGG` | images, VGG16-BN | one multiclass head | multiclass |
| `ScaffoldedGPT` | token ids | one multiclass head | multiclass |

```bash
pip install scaffolded-learning
```

Python ≥ 3.8. Depends on `torch`, `numpy`, `pandas`, `scikit-learn`, `pyarrow`, `optuna`.
