Skip to content

Commit

Permalink
DrHook: Use string instead of numpy funcs for statistics transforms
Browse files Browse the repository at this point in the history
This silences a set of deprecation warnings that we getting annoying.
  • Loading branch information
mlange05 committed Dec 18, 2024
1 parent fec7796 commit c56c3d4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions ifsbench/drhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,17 @@ def parse_profiles(cls, filepath):

# Normalize statistics across processes and threads
grp = data.groupby(['routine'])
data['avgPercent'] = grp['percent'].transform(np.mean)
data['avgTime'] = grp['self'].transform(np.mean)
data['minTime'] = grp['self'].transform(np.min)
data['maxTime'] = grp['self'].transform(np.max)
data['stddev'] = grp['self'].transform(np.std)
data['avgTimeTotal'] = grp['total'].transform(np.mean)
data['minTimeTotal'] = grp['total'].transform(np.min)
data['maxTimeTotal'] = grp['total'].transform(np.max)
data['numCalls'] = grp['calls'].transform(np.sum)
data['cumulative'] = grp['cumul'].transform(np.max)
data['thread'] = grp['thread'].transform(np.max)
data['avgPercent'] = grp['percent'].transform('mean')
data['avgTime'] = grp['self'].transform('mean')
data['minTime'] = grp['self'].transform('min')
data['maxTime'] = grp['self'].transform('max')
data['stddev'] = grp['self'].transform('std')
data['avgTimeTotal'] = grp['total'].transform('mean')
data['minTimeTotal'] = grp['total'].transform('min')
data['maxTimeTotal'] = grp['total'].transform('max')
data['numCalls'] = grp['calls'].transform('sum')
data['cumulative'] = grp['cumul'].transform('max')
data['thread'] = grp['thread'].transform('max')

# Drop raw per-process/thread values and compute imbalance
data.drop(['percent', 'self', 'total', 'cumul', 'calls'], axis=1, inplace=True)
Expand Down

0 comments on commit c56c3d4

Please sign in to comment.