Skip to content

Commit

Permalink
Merge branch 'main' into what-you-put-is-what-you-get
Browse files Browse the repository at this point in the history
  • Loading branch information
thomass-dev committed Jan 17, 2025
2 parents cfa9437 + 4bd8f2f commit 1022e7a
Show file tree
Hide file tree
Showing 67 changed files with 4,433 additions and 1,273 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ jobs:
run: |
python -m pip install --upgrade "pip"
python -m pip install --upgrade "build"
python -m pip install --upgrade "scikit-learn ==${{ matrix.scikit-learn }}"
# adding `.*` to the version ensures that we install the latest version of
# scikit-learn that is compatible with the specified version
python -m pip install --upgrade "scikit-learn ==${{ matrix.scikit-learn }}.*"
# Install `skore` and its dependencies
python -m pip install --upgrade ".[test]"
python -m pip install --upgrade --upgrade-strategy=eager ".[test]"
# Uninstall the `skore` package itself
python -m pip uninstall -y "skore"
Expand All @@ -127,6 +129,11 @@ jobs:
# Install `skore` without its dependencies, which are present in the venv
wheel=(dist/*.whl); python -m pip install --force-reinstall --no-deps "${wheel}"
- name: Show dependencies versions
working-directory: skore/
run: |
python -c "import skore; skore.show_versions()"
- name: Test without coverage
if: ${{ ! matrix.coverage }}
timeout-minutes: 10
Expand Down
3 changes: 2 additions & 1 deletion examples/getting_started/plot_quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

# %%
# This will create a skore project directory named ``quick_start.skore`` in your
# current working directory.
# current working directory and overwrite any pre-existing project with the
# same path.

# %%
# Evaluate your model using skore's :class:`~skore.CrossValidationReporter`:
Expand Down
2 changes: 2 additions & 0 deletions examples/getting_started/plot_skore_product_tour.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@
# import time
#
# my_project.put("my_int", 4)
#
# time.sleep(0.1)
# my_project.put("my_int", 9)
#
# time.sleep(0.1)
# my_project.put("my_int", 16)
#
Expand Down
12 changes: 7 additions & 5 deletions examples/getting_started/plot_tracking_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
import time

my_project.put("my_int", 4)

time.sleep(0.1)
my_project.put("my_int", 9)

time.sleep(0.1)
my_project.put("my_int", 16)

Expand Down Expand Up @@ -76,7 +78,7 @@
history = my_project.get("my_int", latest=False, metadata=True)

# %%
# We can print the first history (first iteration) of this item:
# We can print the details of the first version of this item:

# %%

Expand All @@ -100,7 +102,7 @@
"updated_at": list_updated_at,
}
)
df_track.insert(0, "iteration_number", np.arange(len(df_track)))
df_track.insert(0, "version_number", np.arange(len(df_track)))
df_track

# %%
Expand All @@ -120,7 +122,7 @@

fig = px.line(
df_track,
x="iteration_number",
x="version_number",
y="value",
hover_data=df_track.columns,
markers=True,
Expand All @@ -134,8 +136,8 @@
# example.

# %%
# Here, we focused on `how` to use skore's tracking of history of items.
# But `why` track items?
# Here, we focused on *how* to use skore's tracking of history of items.
# But *why* track items?
#
# * We could track some items such as machine learning scores over time to better
# understand which feature engineering works best.
Expand Down
11 changes: 4 additions & 7 deletions examples/model_evaluation/plot_estimator_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
#
# We can show that without initial cache, it would have taken more time to compute
# the log loss.
reporter.clean_cache()
reporter.clear_cache()

start = time.time()
log_loss = reporter.metrics.log_loss()
Expand Down Expand Up @@ -266,7 +266,7 @@ def operational_decision_cost(y_true, y_pred, amount):
# %%
#
# Let's now clean the cache and see if it is faster.
reporter.clean_cache()
reporter.clear_cache()

# %%
start = time.time()
Expand Down Expand Up @@ -306,10 +306,7 @@ def operational_decision_cost(y_true, y_pred, amount):
from sklearn.metrics import make_scorer, f1_score

f1_scorer = make_scorer(
f1_score,
response_method="predict",
metric_name="F1 Score",
pos_label=pos_label,
f1_score, response_method="predict", metric_name="F1 Score", pos_label=pos_label
)
operational_decision_cost_scorer = make_scorer(
operational_decision_cost,
Expand Down Expand Up @@ -370,7 +367,7 @@ def operational_decision_cost(y_true, y_pred, amount):
# %%
#
# Now, let's clean the cache and check if we get a slowdown.
reporter.clean_cache()
reporter.clear_cache()

# %%
start = time.time()
Expand Down
15 changes: 0 additions & 15 deletions skore-ui/.eslintrc.cjs

This file was deleted.

32 changes: 32 additions & 0 deletions skore-ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import pluginVitest from '@vitest/eslint-plugin'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'

export default [
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
},

{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
},

...pluginVue.configs['flat/essential'],
...vueTsEslintConfig(),

{
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-function-type": "warn",
}
},

{
...pluginVitest.configs.recommended,
files: ['src/**/__tests__/*'],
},
skipFormatting,
]
1 change: 0 additions & 1 deletion skore-ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<meta name="color-scheme" content="light dark">
<meta name="theme-color" content="#1E22AA">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>skore</title>
Expand Down
Loading

0 comments on commit 1022e7a

Please sign in to comment.