Spaces:
Running
Running
Derive new field "infer_tflop_s"
#1
by
andrewlavin
- opened
app.py
CHANGED
@@ -52,6 +52,9 @@ def load_leaderboard():
|
|
52 |
|
53 |
# Merge with benchmark data
|
54 |
result = pd.merge(result, main_bench_dataframe, on=['arch_name', 'img_size'], how='left', suffixes=('', '_benchmark'))
|
|
|
|
|
|
|
55 |
|
56 |
# Calculate average scores
|
57 |
top1_columns = [col for col in result.columns if col.endswith('_top1')]
|
@@ -151,8 +154,8 @@ def create_scatter_plot(df, x_axis, y_axis, model_filter, highlight_filter):
|
|
151 |
full_df = load_leaderboard()
|
152 |
|
153 |
# Define the available columns for sorting and plotting
|
154 |
-
sort_columns = ['avg_top1', 'avg_top5', 'infer_samples_per_sec', 'param_count', 'infer_gmacs', 'infer_macts']
|
155 |
-
plot_columns = ['infer_samples_per_sec', 'infer_gmacs', 'infer_macts', 'param_count', 'avg_top1', 'avg_top5']
|
156 |
|
157 |
DEFAULT_SEARCH = ""
|
158 |
DEFAULT_SORT = "avg_top1"
|
|
|
52 |
|
53 |
# Merge with benchmark data
|
54 |
result = pd.merge(result, main_bench_dataframe, on=['arch_name', 'img_size'], how='left', suffixes=('', '_benchmark'))
|
55 |
+
|
56 |
+
# Calculate TFLOP/s
|
57 |
+
result['infer_tflop_s'] = result['infer_samples_per_sec'] * result['infer_gmacs'] * 2 / 1000
|
58 |
|
59 |
# Calculate average scores
|
60 |
top1_columns = [col for col in result.columns if col.endswith('_top1')]
|
|
|
154 |
full_df = load_leaderboard()
|
155 |
|
156 |
# Define the available columns for sorting and plotting
|
157 |
+
sort_columns = ['avg_top1', 'avg_top5', 'infer_samples_per_sec', 'param_count', 'infer_gmacs', 'infer_macts', 'infer_tflop_s']
|
158 |
+
plot_columns = ['infer_samples_per_sec', 'infer_gmacs', 'infer_macts', 'infer_tflop_s', 'param_count', 'avg_top1', 'avg_top5']
|
159 |
|
160 |
DEFAULT_SEARCH = ""
|
161 |
DEFAULT_SORT = "avg_top1"
|