File tree Expand file tree Collapse file tree
chebai/preprocessing/datasets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1252,7 +1252,20 @@ def load_processed_data(
12521252 # If filename is provided
12531253 return self .load_processed_data_from_file (filename )
12541254
1255- def load_processed_data_from_file (self , filename ):
1255+ def load_processed_data_from_file (self , filename : str ) -> list [dict [str , Any ]]:
1256+ """Load processed data from a file.
1257+
1258+ The full path is not required; only the filename is needed, as it will be joined with the processed directory.
1259+
1260+ Args:
1261+ filename (str): The name of the file to load the processed data from.
1262+
1263+ Returns:
1264+ List[Dict[str, Any]]: The loaded processed data.
1265+
1266+ Example:
1267+ data = self.load_processed_data_from_file('data.pt')
1268+ """
12561269 return torch .load (
12571270 os .path .join (self .processed_dir , filename ), weights_only = False
12581271 )
You can’t perform that action at this time.
0 commit comments