File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
skore-hub-project/src/skore_hub_project/report Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 22
33from collections import defaultdict
44from functools import cached_property
5- from typing import ClassVar
5+ from typing import Any , ClassVar
66
77import numpy as np
88from pydantic import computed_field
@@ -124,9 +124,14 @@ class CrossValidationReportPayload(ReportPayload[CrossValidationReport]):
124124 TableReport ,
125125 )
126126
127- def model_post_init (self , context ): # noqa: D102
127+ def model_post_init (self , _ : Any ) -> None : # noqa: D102
128+ self .__sample_to_class_index : list [int ] | None
129+ self .__classes : list [str ] | None
130+
128131 if "classification" in self .ml_task :
129- class_to_class_indice = defaultdict (lambda : len (class_to_class_indice ))
132+ class_to_class_indice : defaultdict [Any , int ] = defaultdict (
133+ lambda : len (class_to_class_indice )
134+ )
130135
131136 self .__sample_to_class_index = [
132137 class_to_class_indice [sample ] for sample in self .report .y
You can’t perform that action at this time.
0 commit comments