Skip to content

Commit

Permalink
Fix additional FutureWarning issues (#1499)
Browse files Browse the repository at this point in the history
This PR is a followup to #1494 to resolve additional warnings found
during the `qualx evaluate` command.

Confirmed that the evaluation results are identical before/after these
changes.

Signed-off-by: Lee Yang <[email protected]>
  • Loading branch information
leewyang authored Jan 11, 2025
1 parent dd0b336 commit 5745ea5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions user_tools/src/spark_rapids_tools/tools/qualx/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ def combine_tables(table_name: str) -> pd.DataFrame:
['input_bytesRead_sum', 'input_bytesRead_cache']
].max(axis=1)
full_tbl = full_tbl.drop(columns=['input_bytesRead_cache'])
full_tbl['cache_hit_ratio'].fillna(0.0, inplace=True)
full_tbl.fillna({'cache_hit_ratio': 0.0}, inplace=True)
else:
full_tbl['cache_hit_ratio'] = 0.0

Expand Down Expand Up @@ -1162,7 +1162,8 @@ def load_qual_csv(
qual_csv = [os.path.join(q, csv_filename) for q in qual_dirs]
df = None
if qual_csv:
df = pd.concat([pd.read_csv(f) for f in qual_csv])
dfs = [pd.read_csv(f) for f in qual_csv]
df = pd.concat([df for df in dfs if not df.empty])
if cols:
df = df[cols]
return df

0 comments on commit 5745ea5

Please sign in to comment.