Skip to content

Commit

Permalink
remove debugging print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
priyakasimbeg committed Oct 30, 2023
1 parent e9d3c7d commit 4df526b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
3 changes: 1 addition & 2 deletions scoring/score_submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

def main(_):
df = scoring_utils.get_experiment_df(FLAGS.experiment_path)
print(df)
results = {
FLAGS.submission_tag: df,
}
Expand All @@ -33,7 +32,7 @@ def main(_):
reference_submission_tag=None,
num_points=100,
scale='linear',
)
verbosity=0)
if not os.path.exists(FLAGS.output_dir):
os.mkdir(FLAGS.output_dir)
scoring.plot_performance_profiles(
Expand Down
22 changes: 7 additions & 15 deletions scoring/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@ def get_index_that_reaches_target(workload_df,
return -1, -1
else:
index_reached = target_reached.apply(np.argmax)
print(index_reached)
trial = index_reached.idxmin()
print(trial)
print(index_reached)
return trial, index_reached[trial]


Expand All @@ -168,7 +165,6 @@ def get_times_for_submission(submission,

for workload, group in submission.groupby('workload'):
workload_name = re.match(WORKLOAD_NAME_PATTERN, workload).group(1)
print(workload_name)
framework = re.match(WORKLOAD_NAME_PATTERN, workload).group(2)
workload_metadata = WORKLOADS[workload_name]

Expand Down Expand Up @@ -272,19 +268,18 @@ def compute_performance_profiles(results,

if verbosity > 0:
print(f'\n`{time_col}` to reach target normalized to best:')
# with pd.option_context('display.max_rows',
# None,
# 'display.max_columns',
# None,
# 'display.width',
# 1000):
# print(df)
with pd.option_context('display.max_rows',
None,
'display.max_columns',
None,
'display.width',
1000):
print(df)

# If no max_tau is supplied, choose the value of tau that would plot all non
# inf or nan data.
if max_tau is None:
max_tau = df.replace(float('inf'), -1).replace(np.nan, -1).values.max()
print(f"MAX TAU: {max_tau}")

if scale == 'linear':
points = np.linspace(min_tau, max_tau, num=num_points)
Expand Down Expand Up @@ -361,9 +356,6 @@ def plot_performance_profiles(perf_df,
Returns:
None. If a valid save_dir is provided, save both the plot and perf_df.
"""
print("PERF DF")
print(perf_df.columns)
print(perf_df.T)
fig = perf_df.T.plot(figsize=figsize)
df_col_display = f'log10({df_col})' if scale == 'log' else df_col
fig.set_xlabel(
Expand Down

0 comments on commit 4df526b

Please sign in to comment.