Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf:model baseline result displayed in reverse order #187

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading