Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Modify the user API of skore to respect "what you put is what you get" principle #1052

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

thomass-dev
Copy link
Collaborator

@thomass-dev thomass-dev commented Jan 7, 2025

Closes #1045 .


  • hide item API
    • hide put_item
    • hide get_item
    • change get_item_versions to be item agnostic
  • update each item classes to return their original objects
    • cross validation reporter
  • update put to allow the new parameter display_as
  • hide view API
  • move repr_html to reporters

@thomass-dev thomass-dev force-pushed the what-you-put-is-what-you-get branch from afd8291 to 666f094 Compare January 7, 2025 14:52
@thomass-dev thomass-dev force-pushed the what-you-put-is-what-you-get branch from 06ff76f to 0277edb Compare January 7, 2025 15:46
@thomass-dev thomass-dev force-pushed the what-you-put-is-what-you-get branch from c1b9341 to f4552e9 Compare January 7, 2025 15:56
@tuscland tuscland added this to the Skore 0.7 milestone Jan 7, 2025
@glemaitre glemaitre requested review from glemaitre and removed request for glemaitre January 8, 2025 09:59
@glemaitre
Copy link
Member

glemaitre commented Jan 8, 2025

I think that this PR will also close:

@thomass-dev I let you amend your summary if it is the case.

Co-authored-by: Auguste Baum <[email protected]>

commit 86281ca
Author: Auguste Baum <[email protected]>
Date:   Wed Jan 8 12:00:46 2025 +0100

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:skore/tests/integration/ui/test_ui.py

commit 9f6f193
Author: Thomas S <[email protected]>
Date:   Wed Jan 8 11:52:12 2025 +0100

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:skore/tests/integration/ui/test_ui.py

commit cd385f6
Author: Auguste Baum <[email protected]>
Date:   Wed Jan 8 11:41:10 2025 +0100

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:skore/src/skore/persistence/item/sklearn_base_estimator_item.py

commit 41c5355
Author: Thomas S <[email protected]>
Date:   Wed Jan 8 11:27:16 2025 +0100

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:skore/tests/integration/sklearn/test_cross_validate.py

commit a7d956e
Author: Auguste Baum <[email protected]>
Date:   Wed Jan 8 11:14:59 2025 +0100

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:skore/tests/unit/view/test_view_repository.py

commit 38446cf
Author: Thomas S <[email protected]>
Date:   Wed Jan 8 11:01:43 2025 +0100

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:skore/src/skore/persistence/item/pickle_item.py

commit a6e2a79
Author: Thomas S <[email protected]>
Date:   Wed Jan 8 10:51:07 2025 +0100

    mob start [ci-skip] [ci skip] [skip ci]

Co-authored-by: Auguste Baum <[email protected]>
@thomass-dev thomass-dev force-pushed the what-you-put-is-what-you-get branch from 83747f7 to aff2a5f Compare January 8, 2025 11:25
@thomass-dev thomass-dev self-assigned this Jan 10, 2025
# Conflicts:
#	skore/src/skore/project/create.py
#	skore/tests/unit/project/test_project.py
@thomass-dev thomass-dev force-pushed the what-you-put-is-what-you-get branch from a02785f to 862dc49 Compare January 10, 2025 09:22
@thomass-dev thomass-dev force-pushed the what-you-put-is-what-you-get branch from e3d0aa8 to 80df8db Compare January 10, 2025 14:15
Copy link
Contributor

github-actions bot commented Jan 10, 2025

Coverage

Coverage Report for backend
FileStmtsMissCoverMissing
venv/lib/python3.12/site-packages/skore
   __init__.py120100% 
   __main__.py8180%19
   exceptions.py30100% 
venv/lib/python3.12/site-packages/skore/cli
   __init__.py50100% 
   cli.py33385%104, 111, 117
   color_format.py43390%35–>40, 41–43
   launch_dashboard.py261539%36–57
   quickstart_command.py14750%37–51
venv/lib/python3.12/site-packages/skore/persistence
   __init__.py00100% 
venv/lib/python3.12/site-packages/skore/persistence/item
   __init__.py39486%62, 65–68
   cross_validation_reporter_item.py1071388%29–42, 64, 142–143, 268, 271
   item.py411368%85, 88, 92–112
   media_item.py70494%15–18
   numpy_array_item.py25193%15
   pandas_dataframe_item.py34195%15
   pandas_series_item.py34195%15
   pickle_item.py170100% 
   polars_dataframe_item.py32194%15
   polars_series_item.py27194%15
   primitive_item.py27292%13–15
   sklearn_base_estimator_item.py33195%15
   skrub_table_report_item.py10186%11
venv/lib/python3.12/site-packages/skore/persistence/repository
   __init__.py30100% 
   item_repository.py33292%14–15
   view_repository.py16283%8–9
venv/lib/python3.12/site-packages/skore/persistence/storage
   __init__.py40100% 
   abstract_storage.py22195%130
   disk_cache_storage.py33195%44
   in_memory_storage.py200100% 
venv/lib/python3.12/site-packages/skore/persistence/view
   __init__.py00100% 
   view.py50100% 
venv/lib/python3.12/site-packages/skore/project
   __init__.py30100% 
   create.py52888%116–122, 132–133, 140–141
   load.py22388%45–47
   open.py140100% 
   project.py40292%11, 130
venv/lib/python3.12/site-packages/skore/sklearn
   __init__.py40100% 
   find_ml_task.py35195%41–>49, 50
   types.py20100% 
venv/lib/python3.12/site-packages/skore/sklearn/_estimator
   __init__.py100100% 
   base.py76298%87–88
   metrics_accessor.py198298%131, 266
   report.py174197%163–>169, 165–>167, 168, 171–>173, 177–>181, 426–>431
   utils.py11110%1–19
venv/lib/python3.12/site-packages/skore/sklearn/_plot
   __init__.py40100% 
   precision_recall_curve.py126297%200–>203, 313–314
   prediction_error.py75099%289–>297
   roc_curve.py95394%156, 167–>170, 223–224
   utils.py770100% 
venv/lib/python3.12/site-packages/skore/sklearn/cross_validation
   __init__.py20100% 
   cross_validation_helpers.py47490%104–>136, 123–126
   cross_validation_reporter.py35195%177
venv/lib/python3.12/site-packages/skore/sklearn/cross_validation/plots
   __init__.py00100% 
   compare_scores_plot.py292416%10, 28–116
   timing_plot.py292417%10, 26–123
venv/lib/python3.12/site-packages/skore/sklearn/train_test_split
   __init__.py00100% 
   train_test_split.py36294%16–17
venv/lib/python3.12/site-packages/skore/sklearn/train_test_split/warning
   __init__.py80100% 
   high_class_imbalance_too_few_examples_warning.py17378%16–18, 80
   high_class_imbalance_warning.py18288%16–18
   random_state_unset_warning.py11187%15
   shuffle_true_warning.py9091%44–>exit
   stratify_is_set_warning.py11187%15
   time_based_column_warning.py22189%17, 69–>exit
   train_test_split_warning.py5180%21
venv/lib/python3.12/site-packages/skore/ui
   __init__.py00100% 
   app.py25571%24, 53–58
   dependencies.py7186%12
   project_routes.py500100% 
venv/lib/python3.12/site-packages/skore/utils
   __init__.py00100% 
   _accessor.py70100% 
   _logger.py21484%14–18
   _show_versions.py310100% 
TOTAL221418790% 

Tests Skipped Failures Errors Time
374 0 💤 0 ❌ 0 🔥 43.539s ⏱️

@thomass-dev thomass-dev force-pushed the what-you-put-is-what-you-get branch from c0ad30c to c8f3ecf Compare January 13, 2025 14:30
@thomass-dev thomass-dev force-pushed the what-you-put-is-what-you-get branch 2 times, most recently from 510bfa1 to 6255ada Compare January 13, 2025 17:01
@thomass-dev thomass-dev force-pushed the what-you-put-is-what-you-get branch from 6255ada to 4d08a19 Compare January 13, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: As a user, i want to retrieve a CrossValidationReporter from a project
3 participants