File tree Expand file tree Collapse file tree 1 file changed +10
-16
lines changed
chebai/preprocessing/datasets Expand file tree Collapse file tree 1 file changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -1149,24 +1149,18 @@ def load_processed_data(
11491149
11501150 # If both kind and filename are given, use filename
11511151 if kind is not None and filename is None :
1152- try :
1153- if self .use_inner_cross_validation and kind != "test" :
1154- filename = self .processed_file_names_dict [
1155- f"fold_{ self .fold_index } _{ kind } "
1156- ]
1157- else :
1158- data_df = self .dynamic_split_dfs [kind ]
1159- return data_df .to_dict (orient = "records" )
1160- except KeyError :
1161- kind = f"{ kind } "
1152+ if self .use_inner_cross_validation and kind != "test" :
1153+ filename = self .processed_file_names_dict [
1154+ f"fold_{ self .fold_index } _{ kind } "
1155+ ]
1156+ else :
1157+ data_df = self .dynamic_split_dfs [kind ]
1158+ return data_df .to_dict (orient = "records" )
11621159
11631160 # If filename is provided
1164- try :
1165- return torch .load (
1166- os .path .join (self .processed_dir , filename ), weights_only = False
1167- )
1168- except FileNotFoundError :
1169- raise FileNotFoundError (f"File { filename } doesn't exist" )
1161+ return torch .load (
1162+ os .path .join (self .processed_dir , filename ), weights_only = False
1163+ )
11701164
11711165 # ------------------------------ Phase: Raw Properties -----------------------------------
11721166 @property
You can’t perform that action at this time.
0 commit comments