@@ -307,7 +307,13 @@ def get_dataset_score_bounds(
307307 Returns:
308308 dict(str,tuple(float,float)): the score bounds
309309 """
310- score_bounds = dict_minmax ([evaluation .scores for evaluation in experiment .evaluations ])
310+ score_bounds = dict_minmax (
311+ [
312+ evaluation .scores
313+ for evaluation in experiment .evaluations
314+ if evaluation .scores is not None
315+ ]
316+ )
311317 for key , value in score_bounds .items ():
312318 score_bounds [key ] = (
313319 max (0.0 , value [0 ] - numerical_tolerance ),
@@ -349,8 +355,8 @@ def generate_scores_for_testsets(
349355 testset ["tn" ] = random_state .randint (testset ["n" ] + 1 )
350356
351357 if aggregation == "mos" :
352- scores = [calculate_scores_for_lp (testset ) for testset in testsets ]
353- scores = round_scores (dict_mean (scores ), rounding_decimals = rounding_decimals )
358+ scores_list = [calculate_scores_for_lp (testset ) for testset in testsets ]
359+ scores = round_scores (dict_mean (scores_list ), rounding_decimals = rounding_decimals )
354360 return {key : value for key , value in scores .items () if key in subset }
355361
356362 mean_figures = dict_mean (testsets )
@@ -431,7 +437,7 @@ def generate_dataset_folding_multiclass(
431437 ]
432438
433439 if aggregation == "mos" :
434- scores = [
440+ scores_list = [
435441 calculate_multiclass_scores (
436442 sample ,
437443 average = average ,
@@ -440,7 +446,7 @@ def generate_dataset_folding_multiclass(
440446 )
441447 for sample in samples
442448 ]
443- scores = round_scores (dict_mean (scores ), rounding_decimals = rounding_decimals )
449+ scores = round_scores (dict_mean (scores_list ), rounding_decimals = rounding_decimals )
444450 return dataset , folding , scores
445451
446452 # if aggregation == 'som':
0 commit comments