Commit 015a001
feat(skore-mlflow-project): Add integration with MLflow (#2527)
Implements #2134
#### Initial interface proposition
#2134 (comment)
Not much has changed, as anyway, the current plugin interface
constraints the choices quite a lot (which is convenient for a first
implementation)
#### Remaining questions/TODOs:
- [X] handling of logging context: decide what do if there is already an
active run:
- (selected behavior ✔️) crash
- OR: log only artifacts (i.e. only plots and HTMLs) and ignore key.
- OR: create a nested run
- OR (initial behavior): ignore it and create a new independent run
- [x] Documentation/Examples: in PR
#2532.
#### Review guide
The diff is scary, but it mainly comes from CI things, the actual code
diff is something like +600 (excluding tests).
- `skore-mlflow-project/`: the main part of the implementation, it
mainly:
- inspects report objects and call all the metrics/plots/...
- logs those metrics/plots/... into MLFlow
- @glemaitre tested this part, I think we can consider it
:heavy_check_mark:
- `skore/`: :heavy_check_mark:
- small changes to plug `skore.Project` with `skore-mlflow-project/`
- @thomass-dev has quickly reviewed this part, and I addressed his two
comments
- CI changes ✔️
- basic changes to run tests `skore-mlflow-project` => validated by
@thomass-dev
- more complex changes to cover many MLFlow versions are in a separate
PR: #2531
#### Coverage report from local coverage run:
```
Name Stmts Miss Cover Missing
-----------------------------------------------------------------------
src/skore_mlflow_project/__init__.py 5 0 100%
src/skore_mlflow_project/_matplotlib.py 15 0 100%
src/skore_mlflow_project/project.py 191 5 97% 200, 231-232, 377, 379
src/skore_mlflow_project/protocol.py 36 0 100%
src/skore_mlflow_project/reports.py 145 3 98% 203-204, 264
-----------------------------------------------------------------------
TOTAL 392 8 98%
```
---------
Co-authored-by: Auguste Baum <auguste@probabl.ai>1 parent 3833482 commit 015a001
File tree
38 files changed
+5195
-25
lines changed- .github/workflows
- ci
- requirements/skore-mlflow-project
- python-3.10
- scikit-learn-1.5
- scikit-learn-1.7
- python-3.11
- scikit-learn-1.5
- scikit-learn-1.8
- python-3.12
- scikit-learn-1.5
- scikit-learn-1.8
- python-3.13
- scikit-learn-1.5
- scikit-learn-1.6
- scikit-learn-1.7
- scikit-learn-1.8
- skore-mlflow-project
- hatch
- src/skore_mlflow_project
- tests
- unit
- skore
- src/skore/_project
- tests/unit/project
- sphinx
38 files changed
+5195
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
201 | 202 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments