Skip to content

Commit 5ca7b14

Browse files
committed
print first row of data files
1 parent 13afc28 commit 5ca7b14

File tree

1 file changed

+9
-0
lines changed
  • chebai/preprocessing/datasets

1 file changed

+9
-0
lines changed

chebai/preprocessing/datasets/base.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,12 @@ def _set_processed_data_props(self):
474474
)
475475
data_pt = torch.load(pt_file_path, weights_only=False)
476476

477+
print(
478+
"First row of transformed data (.pt pytorch file) :\n",
479+
data_pt[0],
480+
end="\n\n",
481+
)
482+
477483
self._num_of_labels = len(data_pt[0]["labels"])
478484
self._feature_vector_size = max(len(d["features"]) for d in data_pt)
479485

@@ -936,6 +942,9 @@ def _get_data_size(input_file_path: str) -> int:
936942
with open(input_file_path, "rb") as f:
937943
df = pd.read_pickle(f)
938944
print(f"Processed data size ({input_file_path}): {len(df)} rows")
945+
print(
946+
"First row of processed data (pickle file):\n", df.iloc[0], end="\n\n"
947+
)
939948
return len(df)
940949

941950
@abstractmethod

0 commit comments

Comments
 (0)