diff --git a/wtpsplit/evaluation/intrinsic.py b/wtpsplit/evaluation/intrinsic.py index 067cb8a8..d44844b0 100644 --- a/wtpsplit/evaluation/intrinsic.py +++ b/wtpsplit/evaluation/intrinsic.py @@ -267,14 +267,17 @@ def main(args): "t": score_t, "punct": score_punct, } + + if score_u is not None: + u_scores.append((score_u, lang_code)) + if score_t is not None: + t_scores.append((score_t, lang_code)) + if score_punct is not None: + punct_scores.append((score_punct, lang_code)) # just for printing score_t = score_t or 0.0 score_punct = score_punct or 0.0 - - u_scores.append((score_u, lang_code)) - t_scores.append((score_t, lang_code)) - punct_scores.append((score_punct, lang_code)) print(f"{lang_code} {dataset_name} {score_u:.3f} {score_t:.3f} {score_punct:.3f}") # Compute statistics for each metric across all languages diff --git a/wtpsplit/evaluation/time_intrinsic.py b/wtpsplit/evaluation/time_intrinsic.py index 83f89021..0c8a0b89 100644 --- a/wtpsplit/evaluation/time_intrinsic.py +++ b/wtpsplit/evaluation/time_intrinsic.py @@ -39,6 +39,7 @@ def benchmark_strides(low_stride, high_stride, args): "max_n_train_sentences": args.max_n_train_sentences, } ) + print(results_data) return pd.DataFrame(results_data) @@ -73,5 +74,5 @@ def benchmark_strides(low_stride, high_stride, args): # Optionally save df_results to a file # to csv df_results.to_csv( - f"timing_results_{args.model_path.replace('/','__')}_batch{args.batch_size}_b{args.block_size}+s{args.stride}_u{args.threshold}_AVG.csv" + f"timing_results_{args.model_path.replace('/','__')}_batch{args.batch_size}_b{args.block_size}+s{args.stride}_n{args.max_n_train_sentences}_u{args.threshold}_AVG.csv" )