Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
slobentanzer committed May 15, 2024
1 parent 97bfe80 commit c3692e2
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions docs/scripts/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def preprocess_results_for_frontend(
axis=1,
)

aggregated_scores["Full model name"] = (
aggregated_scores.index.get_level_values("model_name")
)
aggregated_scores[
"Full model name"
] = aggregated_scores.index.get_level_values("model_name")
aggregated_scores["Score achieved"] = aggregated_scores["score_achieved"]
aggregated_scores["Score possible"] = aggregated_scores["score_possible"]
aggregated_scores["Iterations"] = aggregated_scores["iterations"]
Expand Down Expand Up @@ -129,9 +129,9 @@ def write_individual_extraction_task_results(raw_results: pd.DataFrame) -> None:
axis=1,
)

aggregated_scores["Full model name"] = (
aggregated_scores.index.get_level_values("model_name")
)
aggregated_scores[
"Full model name"
] = aggregated_scores.index.get_level_values("model_name")
aggregated_scores["Subtask"] = aggregated_scores.index.get_level_values(
"subtask"
)
Expand Down Expand Up @@ -186,9 +186,9 @@ def create_overview_table(result_files_path: str, result_file_names: list[str]):
)

overview_per_quantisation = overview
overview_per_quantisation["Full model name"] = (
overview_per_quantisation.index
)
overview_per_quantisation[
"Full model name"
] = overview_per_quantisation.index
overview_per_quantisation[
["Model name", "Size", "Version", "Quantisation"]
] = overview_per_quantisation["Full model name"].str.split(":", expand=True)
Expand Down Expand Up @@ -220,9 +220,9 @@ def create_overview_table(result_files_path: str, result_file_names: list[str]):
]
]
# round mean and sd to 2 decimal places
overview_per_quantisation.loc[:, "Median Accuracy"] = (
overview_per_quantisation["Median Accuracy"].round(2)
)
overview_per_quantisation.loc[
:, "Median Accuracy"
] = overview_per_quantisation["Median Accuracy"].round(2)
overview_per_quantisation.loc[:, "SD"] = overview_per_quantisation[
"SD"
].round(2)
Expand Down Expand Up @@ -656,9 +656,9 @@ def plot_extraction_tasks():
axis=1,
)

aggregated_scores["Full model name"] = (
aggregated_scores.index.get_level_values("model_name")
)
aggregated_scores[
"Full model name"
] = aggregated_scores.index.get_level_values("model_name")
aggregated_scores["Subtask"] = aggregated_scores.index.get_level_values(
"subtask"
)
Expand Down

0 comments on commit c3692e2

Please sign in to comment.