Skip to content

Commit a7427bc

Browse files
committed
feat(skore-hub-project): Remove media from CrossValidationReportPayload that are not used by the hub
1 parent e1dedaa commit a7427bc

File tree

2 files changed

+2
-29
lines changed

2 files changed

+2
-29
lines changed

skore-hub-project/src/skore_hub_project/report/cross_validation_report.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212
from skore_hub_project.artefact import CrossValidationReportArtefact
1313
from skore_hub_project.media import (
1414
EstimatorHtmlRepr,
15-
PrecisionRecallTest,
16-
PrecisionRecallTrain,
17-
PredictionErrorTest,
18-
PredictionErrorTrain,
19-
RocTest,
20-
RocTrain,
2115
)
2216
from skore_hub_project.media.media import Media
2317
from skore_hub_project.metric import (
@@ -129,18 +123,7 @@ class CrossValidationReportPayload(ReportPayload):
129123
PredictTimeTrainStd,
130124
),
131125
)
132-
MEDIAS: ClassVar[tuple[Media, ...]] = cast(
133-
tuple[Media, ...],
134-
(
135-
EstimatorHtmlRepr,
136-
PrecisionRecallTest,
137-
PrecisionRecallTrain,
138-
PredictionErrorTest,
139-
PredictionErrorTrain,
140-
RocTest,
141-
RocTrain,
142-
),
143-
)
126+
MEDIAS: ClassVar[tuple[Media, ...]] = cast(tuple[Media, ...], (EstimatorHtmlRepr,))
144127

145128
report: CrossValidationReport = Field(repr=False, exclude=True)
146129

skore-hub-project/tests/unit/report/test_cross_validation_report.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
from skore_hub_project.artefact.serializer import Serializer
1010
from skore_hub_project.media import (
1111
EstimatorHtmlRepr,
12-
PrecisionRecallTest,
13-
PrecisionRecallTrain,
14-
RocTest,
15-
RocTrain,
1612
)
1713
from skore_hub_project.metric import (
1814
AccuracyTestMean,
@@ -202,13 +198,7 @@ def test_metrics(self, payload):
202198
]
203199

204200
def test_related_items(self, payload):
205-
assert list(map(type, payload.related_items)) == [
206-
EstimatorHtmlRepr,
207-
PrecisionRecallTest,
208-
PrecisionRecallTrain,
209-
RocTest,
210-
RocTrain,
211-
]
201+
assert list(map(type, payload.related_items)) == [EstimatorHtmlRepr]
212202

213203
@mark.usefixtures("monkeypatch_routes")
214204
def test_model_dump(self, small_cv_binary_classification, payload):

0 commit comments

Comments
 (0)