File tree 1 file changed +5
-3
lines changed
vtr_flow/scripts/tuning_runs
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 6
6
import os
7
7
import sys
8
8
import csv
9
- from typing import Optional
10
9
import pandas as pd
11
10
import numpy as np
12
11
from scipy import stats
@@ -165,14 +164,16 @@ def parse_script_params(script_params):
165
164
166
165
def generate_avg_seed_csv (full_res_csv_path , output_dir ):
167
166
"""Generate the average results over the seeds"""
168
- df : Optional [ pd . DataFrame ] = pd .read_csv (full_res_csv_path )
167
+ df = pd .read_csv (full_res_csv_path )
169
168
assert isinstance (df , pd .DataFrame )
170
169
171
170
if KEEP_METRICS_ONLY :
172
171
col_to_keep = ["circuit" , "arch" ]
173
172
col_to_keep .extend (list (PARAMS_DICT .keys ()))
174
173
col_to_keep .extend (PARSED_METRICS )
175
- df = df .drop (columns = [col for col in df .columns if col not in col_to_keep ])
174
+ df = df .drop (
175
+ columns = [col for col in df .columns if col not in col_to_keep ]
176
+ ) # pylint: disable=no-member
176
177
177
178
# Check if '--seed' column is present
178
179
if "--seed" in df .columns :
@@ -204,6 +205,7 @@ def generate_geomean_res_csv(full_res_csv_path, output_dir):
204
205
param_columns = [key for key in PARAMS_DICT if key != "--seed" ]
205
206
non_param_columns = [col for col in df .columns if col not in param_columns ]
206
207
208
+ # pylint: disable=no-member
207
209
geomean_df = (
208
210
df .groupby (param_columns )
209
211
.agg (
You can’t perform that action at this time.
0 commit comments