refactor: Disambiguate the different (_?)estimator(_?) attributes#2907
Merged
Conversation
EstimatorReport._estimator to EstimatorReport.learner_
EstimatorReport._estimator to EstimatorReport.learner_(_?)estimator(_?) attributes
b32e9fa to
527e4c0
Compare
Contributor
Coverage Report for |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| File | Stmts | Miss | Branch | BrPart | Cover | Missing |
|---|---|---|---|---|---|---|
| skore/src/skore | ||||||
| __init__.py | 39 | 2 | 2 | 0 | 94% | 112–113 |
| _config.py | 58 | 3 | 12 | 1 | 94% | 71, 118–119 |
| exceptions.py | 4 | 4 | 0 | 0 | 0% | 4, 15, 19, 23 |
| skore/src/skore/_plugins | ||||||
| __init__.py | 12 | 0 | 0 | 0 | 100% | |
| skore/src/skore/_plugins/hub | ||||||
| __init__.py | 9 | 2 | 0 | 0 | 77% | 15, 20 |
| exception.py | 2 | 0 | 0 | 0 | 100% | |
| json.py | 10 | 1 | 2 | 1 | 90% | 16 |
| skore/src/skore/_plugins/hub/artifact | ||||||
| __init__.py | 0 | 0 | 0 | 0 | 100% | |
| artifact.py | 23 | 0 | 4 | 0 | 100% | |
| serializer.py | 27 | 0 | 2 | 0 | 100% | |
| upload.py | 26 | 0 | 4 | 0 | 100% | |
| skore/src/skore/_plugins/hub/artifact/media | ||||||
| __init__.py | 5 | 0 | 0 | 0 | 100% | |
| data.py | 20 | 0 | 0 | 0 | 100% | |
| inspection.py | 72 | 10 | 20 | 8 | 86% | 46–49, 51, 53, 60, 62, 68, 107 |
| media.py | 10 | 0 | 0 | 0 | 100% | |
| model.py | 10 | 0 | 0 | 0 | 100% | |
| performance.py | 106 | 1 | 8 | 1 | 99% | 43 |
| skore/src/skore/_plugins/hub/artifact/pickle | ||||||
| __init__.py | 2 | 0 | 0 | 0 | 100% | |
| pickle.py | 24 | 0 | 2 | 0 | 100% | |
| skore/src/skore/_plugins/hub/authentication | ||||||
| __init__.py | 0 | 0 | 0 | 0 | 100% | |
| apikey.py | 7 | 0 | 0 | 0 | 100% | |
| login.py | 28 | 4 | 4 | 2 | 85% | 37, 42–43, 52 |
| token.py | 80 | 0 | 8 | 0 | 100% | |
| uri.py | 6 | 0 | 0 | 0 | 100% | |
| skore/src/skore/_plugins/hub/client | ||||||
| __init__.py | 0 | 0 | 0 | 0 | 100% | |
| client.py | 88 | 10 | 18 | 3 | 88% | 140, 187–189, 191–192, 194, 196, 198, 230 |
| skore/src/skore/_plugins/hub/metric | ||||||
| __init__.py | 10 | 0 | 0 | 0 | 100% | |
| accuracy.py | 35 | 0 | 0 | 0 | 100% | |
| brier_score.py | 35 | 0 | 0 | 0 | 100% | |
| log_loss.py | 35 | 0 | 0 | 0 | 100% | |
| metric.py | 55 | 4 | 2 | 1 | 92% | 38, 77–78, 84 |
| precision.py | 57 | 0 | 0 | 0 | 100% | |
| r2.py | 35 | 0 | 0 | 0 | 100% | |
| recall.py | 59 | 0 | 0 | 0 | 100% | |
| rmse.py | 35 | 0 | 0 | 0 | 100% | |
| roc_auc.py | 35 | 0 | 0 | 0 | 100% | |
| timing.py | 76 | 4 | 0 | 0 | 94% | 45–46, 104–105 |
| skore/src/skore/_plugins/hub/project | ||||||
| __init__.py | 0 | 0 | 0 | 0 | 100% | |
| project.py | 138 | 6 | 26 | 5 | 95% | 84, 109, 124, 323, 403, 433 |
| skore/src/skore/_plugins/hub/report | ||||||
| __init__.py | 3 | 0 | 0 | 0 | 100% | |
| cross_validation_report.py | 121 | 2 | 28 | 3 | 98% | 224, 264 |
| estimator_report.py | 10 | 0 | 0 | 0 | 100% | |
| report.py | 60 | 0 | 6 | 0 | 100% | |
| skore/src/skore/_plugins/local | ||||||
| __init__.py | 2 | 0 | 0 | 0 | 100% | |
| metadata.py | 81 | 3 | 8 | 1 | 96% | 29, 141–142 |
| project.py | 93 | 1 | 30 | 1 | 98% | 238 |
| storage.py | 42 | 2 | 6 | 1 | 95% | 45, 189 |
| skore/src/skore/_plugins/mlflow | ||||||
| __init__.py | 5 | 0 | 0 | 0 | 100% | |
| project.py | 209 | 15 | 54 | 5 | 92% | 202, 233–234, 380, 382, 398, 400–405, 407–409 |
| reports.py | 155 | 6 | 34 | 4 | 96% | 129, 170, 207–208, 270, 283 |
| skore/src/skore/_project | ||||||
| __init__.py | 0 | 0 | 0 | 0 | 100% | |
| _summary.py | 80 | 1 | 38 | 3 | 98% | 121 |
| _widget.py | 191 | 0 | 44 | 2 | 100% | |
| dependencies.py | 19 | 0 | 6 | 0 | 100% | |
| git.py | 25 | 0 | 4 | 0 | 100% | |
| login.py | 17 | 3 | 6 | 2 | 82% | 62, 71–72 |
| plugin.py | 12 | 0 | 2 | 0 | 100% | |
| project.py | 56 | 2 | 16 | 3 | 96% | 132, 141 |
| types.py | 3 | 0 | 0 | 0 | 100% | |
| skore/src/skore/_sklearn | ||||||
| __init__.py | 8 | 0 | 0 | 0 | 100% | |
| _base.py | 54 | 1 | 10 | 0 | 98% | 44 |
| compare.py | 5 | 0 | 0 | 0 | 100% | |
| evaluate.py | 43 | 0 | 24 | 0 | 100% | |
| feature_names.py | 26 | 0 | 12 | 0 | 100% | |
| find_ml_task.py | 61 | 0 | 46 | 2 | 100% | |
| metrics.py | 316 | 0 | 76 | 1 | 100% | |
| types.py | 19 | 1 | 0 | 0 | 94% | 31 |
| skore/src/skore/_sklearn/_checks | ||||||
| __init__.py | 3 | 0 | 0 | 0 | 100% | |
| _utils.py | 47 | 3 | 20 | 3 | 93% | 47, 147, 155 |
| accessor.py | 33 | 1 | 14 | 0 | 96% | 17 |
| base.py | 76 | 5 | 24 | 3 | 93% | 128–129, 169, 257–258 |
| model_checks.py | 163 | 4 | 40 | 4 | 97% | 320, 328, 364, 368 |
| skore/src/skore/_sklearn/_comparison | ||||||
| __init__.py | 9 | 0 | 0 | 0 | 100% | |
| inspection_accessor.py | 27 | 1 | 2 | 0 | 96% | 347 |
| metrics_accessor.py | 122 | 4 | 18 | 4 | 96% | 259–260, 329, 1115 |
| report.py | 160 | 5 | 68 | 0 | 96% | 577, 583, 641–643 |
| skore/src/skore/_sklearn/_cross_validation | ||||||
| __init__.py | 11 | 0 | 0 | 0 | 100% | |
| data_accessor.py | 36 | 2 | 12 | 2 | 94% | 48, 74 |
| inspection_accessor.py | 27 | 1 | 2 | 0 | 96% | 319 |
| metrics_accessor.py | 120 | 3 | 18 | 3 | 97% | 214–215, 1077 |
| report.py | 202 | 10 | 48 | 6 | 95% | 73, 78, 83, 324, 598, 642, 648, 734–736 |
| skore/src/skore/_sklearn/_estimator | ||||||
| __init__.py | 11 | 0 | 0 | 0 | 100% | |
| data_accessor.py | 48 | 2 | 20 | 1 | 95% | 61, 178 |
| inspection_accessor.py | 37 | 1 | 8 | 2 | 97% | 278 |
| metrics_accessor.py | 125 | 0 | 22 | 0 | 100% | |
| report.py | 329 | 14 | 92 | 10 | 95% | 60, 74, 295, 368, 453, 710, 799, 818, 820, 826–827, 914–916 |
| skore/src/skore/_sklearn/_plot | ||||||
| __init__.py | 3 | 0 | 0 | 0 | 100% | |
| base.py | 61 | 2 | 14 | 1 | 96% | 61–62 |
| utils.py | 145 | 3 | 66 | 3 | 97% | 254–255, 428 |
| skore/src/skore/_sklearn/_plot/data | ||||||
| __init__.py | 2 | 0 | 0 | 0 | 100% | |
| table_report.py | 177 | 1 | 60 | 1 | 99% | 670 |
| skore/src/skore/_sklearn/_plot/inspection | ||||||
| __init__.py | 0 | 0 | 0 | 0 | 100% | |
| coefficients.py | 181 | 0 | 88 | 1 | 100% | |
| impurity_decrease.py | 103 | 2 | 34 | 3 | 98% | 423, 467 |
| permutation_importance.py | 198 | 1 | 90 | 1 | 99% | 585 |
| utils.py | 32 | 0 | 10 | 0 | 100% | |
| skore/src/skore/_sklearn/_plot/metrics | ||||||
| __init__.py | 6 | 0 | 0 | 0 | 100% | |
| confusion_matrix.py | 198 | 0 | 66 | 2 | 100% | |
| metrics_summary_display.py | 152 | 1 | 74 | 2 | 99% | 290 |
| precision_recall_curve.py | 113 | 0 | 32 | 1 | 100% | |
| prediction_error.py | 166 | 0 | 54 | 2 | 100% | |
| roc_curve.py | 119 | 0 | 34 | 2 | 100% | |
| skore/src/skore/_sklearn/train_test_split | ||||||
| __init__.py | 2 | 0 | 0 | 0 | 100% | |
| train_test_split.py | 71 | 0 | 34 | 2 | 100% | |
| skore/src/skore/_sklearn/train_test_split/warning | ||||||
| __init__.py | 8 | 0 | 0 | 0 | 100% | |
| high_class_imbalance_too_few_examples_warning.py | 19 | 1 | 6 | 1 | 94% | 83 |
| high_class_imbalance_warning.py | 20 | 0 | 6 | 0 | 100% | |
| random_state_unset_warning.py | 10 | 0 | 2 | 0 | 100% | |
| shuffle_true_warning.py | 9 | 0 | 2 | 0 | 100% | |
| stratify_is_set_warning.py | 10 | 0 | 2 | 0 | 100% | |
| time_based_column_warning.py | 21 | 0 | 4 | 0 | 100% | |
| train_test_split_warning.py | 3 | 0 | 0 | 0 | 100% | |
| skore/src/skore/_utils | ||||||
| __init__.py | 6 | 2 | 0 | 0 | 66% | 8, 13 |
| _accessor.py | 106 | 28 | 30 | 13 | 73% | 12–13, 15, 36, 61–65, 68, 70–71, 76, 81, 83, 85, 92–94, 120–121, 123–124, 126, 132, 164, 218, 238 |
| _cache.py | 37 | 0 | 2 | 1 | 100% | |
| _cache_key.py | 35 | 5 | 22 | 5 | 85% | 22, 24, 51, 59, 68 |
| _callable_name.py | 9 | 0 | 4 | 0 | 100% | |
| _dataframe.py | 43 | 4 | 18 | 4 | 90% | 27, 46, 48, 63 |
| _environment.py | 33 | 2 | 10 | 3 | 93% | 46, 49 |
| _fixes.py | 8 | 0 | 2 | 0 | 100% | |
| _index.py | 5 | 0 | 2 | 0 | 100% | |
| _jupyter.py | 8 | 2 | 0 | 0 | 75% | 13–14 |
| _measure_time.py | 10 | 0 | 0 | 0 | 100% | |
| _parallel.py | 17 | 0 | 0 | 0 | 100% | |
| _patch.py | 21 | 12 | 8 | 8 | 42% | 30, 35–39, 42–43, 46–47, 58, 60 |
| _progress_bar.py | 42 | 4 | 4 | 0 | 90% | 53–54, 64–65 |
| _show_versions.py | 38 | 0 | 12 | 0 | 100% | |
| _skrub.py | 37 | 0 | 4 | 0 | 100% | |
| _testing.py | 128 | 14 | 12 | 2 | 89% | 24, 33, 71–72, 94, 193, 202, 213–218, 220 |
| skore/src/skore/_utils/repr | ||||||
| __init__.py | 2 | 0 | 0 | 0 | 100% | |
| base.py | 54 | 0 | 4 | 0 | 100% | |
| data.py | 128 | 0 | 30 | 1 | 100% | |
| html_repr.py | 40 | 0 | 0 | 0 | 100% | |
| rich_repr.py | 80 | 0 | 22 | 3 | 100% | |
| utils.py | 11 | 0 | 2 | 0 | 100% | |
| TOTAL | 7302 | 228 | 1838 | 150 | 96% | |
| Tests | Skipped | Failures | Errors | Time |
|---|---|---|---|---|
| 2564 | 6 💤 | 0 ❌ | 0 🔥 | 8m 50s ⏱️ |
527e4c0 to
cca956b
Compare
Contributor
This comment was marked as outdated.
This comment was marked as outdated.
cca956b to
dbd79c3
Compare
jeromedockes
previously approved these changes
May 18, 2026
Collaborator
jeromedockes
left a comment
There was a problem hiding this comment.
thanks @auguste-probabl ! I think your proposed organization is good:
original_estimatoris whatever the user gave, without transformationslearner_is the fitted object, with a skrublearner interface (predict({...}) ). iforiginal_estimatorhad the scikit-learn interface (predict(X, y)) it is wrapped in an adapter.learner_is what is used almost everywhere internallyestimator_is the fitted object without wrapping, ie with the same interface asoriginal_estimator-- the interface expected by the user
@glemaitre WDYT
Previously we had `estimator`, `estimator_` and `_estimator`.
bb02bc0 to
838f0d9
Compare
jeromedockes
approved these changes
May 20, 2026
Collaborator
jeromedockes
left a comment
There was a problem hiding this comment.
thank you @auguste-probabl , LGTM!
Member
|
Thanks @auguste-probabl |
Collaborator
|
great! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
estimatorbecomes the original estimator passed at initializationestimator_becomes the fitted estimator (following sklearn convention); has the same type asestimator_estimatorbecomeslearner_, the estimator wrapped in a SkrubLearner-compatible interface (used internally)AI usage disclosure
AI tools were involved for:
Nothing