Skip to content

Commit

Permalink
fix : minor bug in Compare fixed #347
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi authored and alirezazolanvari committed Nov 28, 2021
1 parent d1965c9 commit d30c735
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pycm/pycm_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def __compare_class_handler__(compare, cm_dict):
:return: None
"""
class_weight_sum = sum(compare.class_weight.values())
class_benchmark_weight_sum = sum(compare.class_benchmark_weight)
class_benchmark_weight_sum = sum(compare.class_benchmark_weight.values())
for c in compare.classes:
for item in CLASS_BENCHMARK_SCORE_DICT.keys():
max_item_score = len(CLASS_BENCHMARK_SCORE_DICT[item]) - 1
Expand All @@ -165,7 +165,7 @@ def __compare_overall_handler__(compare, cm_dict):
:type cm_dict : dict
:return: None
"""
overall_benchmark_weight_sum = sum(compare.overall_benchmark_weight)
overall_benchmark_weight_sum = sum(compare.overall_benchmark_weight.values())
for item in OVERALL_BENCHMARK_SCORE_DICT.keys():
max_item_score = len(OVERALL_BENCHMARK_SCORE_DICT[item]) - 1
all_overall_score = [OVERALL_BENCHMARK_SCORE_DICT[item][
Expand Down

0 comments on commit d30c735

Please sign in to comment.