File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
chebai/preprocessing/datasets Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,23 @@ def processed_file_names(self) -> List[str]:
183183 """
184184 return ["test.pt" , "train.pt" , "validation.pt" ]
185185
186+ def _set_processed_data_props (self ):
187+ """
188+ Load processed data and extract metadata.
189+
190+ Sets:
191+ - self._num_of_labels: Number of target labels in the dataset.
192+ - self._feature_vector_size: 0.
193+ """
194+ with open (self .processed_dir_main , "classes.txt" ) as f :
195+ classes = [f .strip () for f in f .readlines () if f .strip ()]
196+
197+ self ._num_of_labels = len (classes )
198+ self ._feature_vector_size = 0
199+
200+ print (f"Number of labels for loaded data: { self ._num_of_labels } " )
201+ print (f"Feature vector size: { self ._feature_vector_size } " )
202+
186203 def _perform_data_preparation (self , * args , ** kwargs ):
187204 """
188205 Checks for raw data and downloads if necessary.
You can’t perform that action at this time.
0 commit comments