Skip to content

Commit a92723a

Browse files
committed
hotfix: Enhance lustre_df method to assert single data frame and return components
1 parent ab90565 commit a92723a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drishti/handlers/darshan_util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,10 @@ def file_not_aligned(self) -> int:
645645
def lustre_df(self) -> Optional[pd.DataFrame]:
646646
if "LUSTRE" not in self.modules:
647647
return None
648-
return pd.DataFrame(self.report.records["LUSTRE"].to_df())
648+
lustre_dict = self.report.records["LUSTRE"].to_df()
649+
assert len(lustre_dict) == 1, f"Expected 1 data frame for LUSTRE, got {len(self.report.records['LUSTRE'].to_df())}"
650+
lustre_df = lustre_dict["components"]
651+
return lustre_df
649652

650653
@cached_property
651654
def max_read_offset(self) -> int:

0 commit comments

Comments
 (0)