Skip to content

Commit

Permalink
perf:model baseline result displayed in reverse order (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
junewgl authored Dec 16, 2023
1 parent 823f1c9 commit 2b494be
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions dbgpt_hub/baseline/show_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,6 @@ def init_baseline_json():
baseline_json = json.load(file)


def print_color_table_score(acc_data, dataset, model, method, prompt):
model_data = [dataset, model, method, prompt]
print_table_scores = ColorTable(theme=MYTHEME)
print_table_scores.field_names = HEADER
model_ex = get_model_score(acc_data, "ex", model_data)
model_em = get_model_score(acc_data, "em", model_data)
print_table_scores.add_rows([model_em, model_ex])
print(print_table_scores, "\n")


def table_add_row(table_scores, acc_data, dataset, model, method, prompt):
model_data = [dataset, model, method, prompt]
model_ex = get_model_score(acc_data, "ex", model_data)
Expand Down Expand Up @@ -150,6 +140,8 @@ def show_score(dataset=None, model=None, method=None, prompt=None):
table_scores = ColorTable(theme=MYTHEME)
table_scores.field_names = HEADER
add_scores_to_table(table_scores, json_data, dataset, model, method, prompt)
table_scores.sortby = "all"
table_scores.reversesort = True
print(table_scores)


Expand Down Expand Up @@ -193,6 +185,8 @@ def show_scores():
table_scores = table_add_row(
table_scores, acc_data, dataset, model, method, prompt
)
table_scores.sortby = "all"
table_scores.reversesort = True
print(table_scores, "\n")


Expand Down

0 comments on commit 2b494be

Please sign in to comment.