Skip to content

Commit 7fe009f

Browse files
committed
docs: Add MLflow integration tutorial and example
Add comprehensive documentation and working example for MLflow integration: - Tutorial covering experiment tracking, pyfunc model creation, and deployment - Example scripts with training data and pyfunc wrapper implementation - Updated README with PyPI installation instructions
1 parent 604d74d commit 7fe009f

10 files changed

Lines changed: 1899 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,26 @@ A unified, extensible framework for text classification with categorical variabl
2020

2121
## 📦 Installation
2222

23+
### From Pypi (recommended)
24+
25+
```bash
26+
# With uv
27+
28+
uv add torchTextClassifiers
29+
30+
# For using huggingface tokenizers
31+
uv add torchTextClassifiers --extra huggingface
32+
33+
# With pip
34+
35+
pip install torchTextclassifiers
36+
37+
# For using huggingface tokenizers
38+
pip install torchTextclassifiers[huggingface]
39+
```
40+
41+
42+
### From Source
2343
```bash
2444
# Clone the repository
2545
git clone https://github.com/InseeFrLab/torchTextClassifiers.git

docs/source/tutorials/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ multiclass_classification
1010
mixed_features
1111
explainability
1212
multilabel_classification
13+
mlflow_integration
1314
```
1415

1516
## Overview
@@ -116,6 +117,22 @@ Assign multiple labels to each text sample for complex classification scenarios.
116117
**Difficulty:** Advanced | **Time:** 30 minutes
117118
:::
118119

120+
:::{grid-item-card} {fas}`chart-line` MLflow Integration
121+
:link: mlflow_integration
122+
:link-type: doc
123+
124+
Track experiments and deploy models with MLflow for production-ready ML pipelines.
125+
126+
**What you'll learn:**
127+
- Log training metrics per epoch
128+
- Create portable pyfunc models
129+
- Export models without package dependency
130+
- Flexible inference input formats
131+
- Use MLflow UI for visualization
132+
133+
**Difficulty:** Advanced | **Time:** 25 minutes
134+
:::
135+
119136
::::
120137

121138
## Learning Path
@@ -129,6 +146,7 @@ graph LR
129146
C --> D[Mixed Features]
130147
C --> F[Multilabel Classification]
131148
D --> E[Explainability]
149+
D --> G[MLflow Integration]
132150
F --> E
133151
134152
style A fill:#e3f2fd
@@ -137,13 +155,15 @@ graph LR
137155
style D fill:#64b5f6
138156
style E fill:#1976d2
139157
style F fill:#42a5f5
158+
style G fill:#4caf50
140159
```
141160

142161
1. **Start with**: {doc}`../getting_started/quickstart` - Get familiar with the basics
143162
2. **Then**: {doc}`basic_classification` - Understand the complete workflow
144163
3. **Next**: {doc}`multiclass_classification` - Handle multiple classes
145164
4. **Branch out**: {doc}`mixed_features` for categorical features OR {doc}`multilabel_classification` for multiple labels
146165
5. **Master**: {doc}`explainability` - Understand your model's predictions
166+
6. **Deploy**: {doc}`mlflow_integration` - Track experiments and deploy to production
147167

148168
## Tutorial Format
149169

@@ -238,6 +258,7 @@ All tutorials are based on runnable examples in the repository:
238258
- [examples/using_additional_features.py](https://github.com/InseeFrLab/torchTextClassifiers/blob/main/examples/using_additional_features.py)
239259
- [examples/advanced_training.py](https://github.com/InseeFrLab/torchTextClassifiers/blob/main/examples/advanced_training.py)
240260
- [examples/simple_explainability_example.py](https://github.com/InseeFrLab/torchTextClassifiers/blob/main/examples/simple_explainability_example.py)
261+
- [examples/mlflow_logging_example.py](https://github.com/InseeFrLab/torchTextClassifiers/blob/main/examples/mlflow_logging_example.py)
241262

242263
### Jupyter Notebooks
243264

0 commit comments

Comments
 (0)