Skip to content

Commit

Permalink
[Fix] frame.append dreprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannilopez9808 committed Mar 19, 2023
1 parent b52a3b0 commit b16d1a3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions torchstat/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ def report_format(collected_nodes):
del df['duration']

# Add Total row
total_df = pd.Series([total_parameters_quantity, total_memory,
total_operation_quantity, total_flops,
total_duration, mread, mwrite, total_memrw],
index=['params', 'memory(MB)', 'MAdd', 'Flops', 'duration[%]',
'MemRead(B)', 'MemWrite(B)', 'MemR+W(B)'],
name='total')
df = df.append(total_df)
total_df = pd.DataFrame([[total_parameters_quantity, total_memory,
total_operation_quantity, total_flops,
total_duration, mread, mwrite, total_memrw]],
columns=['params', 'memory(MB)', 'MAdd', 'Flops', 'duration[%]',
'MemRead(B)', 'MemWrite(B)', 'MemR+W(B)'],
index=['total'])
df = pd.concat([
df,
total_df
])

df = df.fillna(' ')
df['memory(MB)'] = df['memory(MB)'].apply(
Expand Down

0 comments on commit b16d1a3

Please sign in to comment.