Skip to content

Commit a5ea56a

Browse files
committed
docstring
1 parent 89cb005 commit a5ea56a

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

  • chebai/preprocessing/datasets

chebai/preprocessing/datasets/base.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff 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
)

0 commit comments

Comments
 (0)