Skip to content

Commit

Permalink
WIP - Change examples
Browse files Browse the repository at this point in the history
  • Loading branch information
thomass-dev committed Jan 10, 2025
1 parent 80df8db commit c8f3ecf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/getting_started/plot_tracking_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
# We retrieve the history of the ``my_int`` item:

# %%
item_histories = my_project.get_item_versions("my_int")
item_histories = my_project.get_item_versions("my_int") # TO CHANGE /!\

# %%
# We can print the first history (first iteration) of this item:
Expand Down
18 changes: 6 additions & 12 deletions examples/getting_started/plot_working_with_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,25 +119,19 @@ def my_func(x):
)

# %%
# Moreover, we can also explicitly tell skore the media type of an object, for example
# in HTML:
# Moreover, we can also explicitly tell skore the way we want to display an object, for
# example in HTML:

# %%
from skore.item import MediaItem

my_project.put_item(
my_project.put(
"my_string_3",
MediaItem.factory(
"<p><h1>Title</h1> <b>bold</b>, <i>italic</i>, etc.</p>", media_type="text/html"
),
"<p><h1>Title</h1> <b>bold</b>, <i>italic</i>, etc.</p>",
display_as="html",
)

# %%
# .. note::
# We used :func:`~skore.Project.put_item` instead of :func:`~skore.Project.put`.

# %%
# Note that the media type is only used for the UI, and not in this notebook at hand:
# Note that the `display_as` is only used for the UI, and not in this notebook at hand:

# %%
my_project.get("my_string_3")
Expand Down
2 changes: 1 addition & 1 deletion examples/model_evaluation/plot_cross_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
# %%
# We can also access the plot after we have stored the ``CrossValidationReporter``:
my_project.put("cross_validation_regression", reporter)
cv_item = my_project.get_item("cross_validation_regression")
cv_item = my_project.get_item("cross_validation_regression") # TO CHANGE /!\
cv_item.plots["Scores"]

# %%
Expand Down

0 comments on commit c8f3ecf

Please sign in to comment.