Skip to content

Commit 0ca228e

Browse files
committed
[ci skip] WIP - Close figures when computing metrics in skore_estimator_report_item
1 parent 14247e4 commit 0ca228e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

skore-remote-project/src/skore_remote_project/item/skore_estimator_report_item.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typing import TYPE_CHECKING
77

88
from joblib import hash as joblib_hash
9-
from matplotlib.pyplot import subplots
9+
from matplotlib.pyplot import close, subplots
1010
from sklearn.utils import estimator_html_repr
1111

1212
from .item import ItemTypeError, lazy_is_instance
@@ -185,6 +185,7 @@ def mpl(self, name, category, **kwargs) -> Union[Representation, None]:
185185
display = function(**function_kwargs)
186186
figure, ax = subplots()
187187
display.plot(ax)
188+
close(figure)
188189

189190
item = MatplotlibFigureItem.factory(figure)
190191

0 commit comments

Comments
 (0)