adding energy
Browse files
app.py
CHANGED
@@ -28,11 +28,14 @@ def make_link(mname):
|
|
28 |
def get_model_names(task_data):
|
29 |
#TODO: add link to results in model card of each model
|
30 |
task_df= pd.read_csv('data/params/'+task_data)
|
|
|
31 |
task_df= task_df.rename(columns={"Link": "model"})
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
36 |
print(model_names)
|
37 |
return model_names
|
38 |
|
|
|
28 |
def get_model_names(task_data):
|
29 |
#TODO: add link to results in model card of each model
|
30 |
task_df= pd.read_csv('data/params/'+task_data)
|
31 |
+
energy_df= pd.read_csv('data/energy/'+task_data)
|
32 |
task_df= task_df.rename(columns={"Link": "model"})
|
33 |
+
all_df = pd.merge(task_df, energy_df, on='model')
|
34 |
+
all_df=all_df.drop_duplicates(subset=['model'])
|
35 |
+
all_df['parameters'] = all_df['parameters'].apply(format_params)
|
36 |
+
all_df['model'] = all_df['model'].apply(make_link)
|
37 |
+
all_df['Total GPU Energy (Wh)'] = all_df['Total GPU Energy (Wh)'].round(2)
|
38 |
+
model_names = all_df[['model','parameters','Total GPU Energy (Wh)']]
|
39 |
print(model_names)
|
40 |
return model_names
|
41 |
|