akera commited on
Commit
8727da4
·
verified ·
1 Parent(s): e448f50

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +45 -5
config.py CHANGED
@@ -7,9 +7,9 @@ LEADERBOARD_DATASET = "Sunbird/salt-translation-leaderboard"
7
  TEST_SET_DATASET = "Sunbird/salt-translation-test-set"
8
  SALT_DATASET = "sunbird/salt"
9
 
10
- # Language settings - ALL UG40 LANGUAGES
11
  ALL_UG40_LANGUAGES = [
12
- 'ach', 'eng', 'lgg', 'lug', 'nyn', 'rny', 'teo', 'swa' # Complete this with actual SALT languages
13
  ]
14
 
15
  LANGUAGE_NAMES = {
@@ -54,9 +54,49 @@ PREDICTION_FORMAT = {
54
  'file_types': ['.csv', '.tsv', '.json']
55
  }
56
 
57
- # Metrics configuration
58
  METRICS_CONFIG = {
59
  'primary_metrics': ['bleu', 'chrf', 'quality_score'],
60
- 'secondary_metrics': ['rouge1', 'rougeL', 'cer', 'wer'],
61
- 'display_precision': 4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
 
7
  TEST_SET_DATASET = "Sunbird/salt-translation-test-set"
8
  SALT_DATASET = "sunbird/salt"
9
 
10
+ # Language settings - ALL UG40 LANGUAGES (Updated from SALT constants)
11
  ALL_UG40_LANGUAGES = [
12
+ 'ach', 'eng', 'lgg', 'lug', 'nyn', 'rny', 'teo', 'swa'
13
  ]
14
 
15
  LANGUAGE_NAMES = {
 
54
  'file_types': ['.csv', '.tsv', '.json']
55
  }
56
 
57
+ # Metrics configuration - Updated to match reference implementation
58
  METRICS_CONFIG = {
59
  'primary_metrics': ['bleu', 'chrf', 'quality_score'],
60
+ 'secondary_metrics': ['rouge1', 'rouge2', 'rougeL', 'cer', 'wer', 'len_ratio'],
61
+ 'display_precision': 4,
62
+ 'quality_score_components': [
63
+ 'bleu', # normalized to 0-1
64
+ 'chrf', # already 0-1
65
+ 'cer', # inverted (1-cer)
66
+ 'wer', # inverted (1-wer)
67
+ 'rouge1', # 0-1
68
+ 'rougeL' # 0-1
69
+ ],
70
+ 'error_metrics': ['cer', 'wer'], # Lower is better
71
+ 'score_metrics': ['bleu', 'chrf', 'quality_score', 'rouge1', 'rouge2', 'rougeL'] # Higher is better
72
+ }
73
+
74
+ # Display settings for leaderboard
75
+ DISPLAY_CONFIG = {
76
+ 'max_models_radar': 8,
77
+ 'max_models_ranking': 15,
78
+ 'max_language_pairs_detail': 20,
79
+ 'decimal_places': {
80
+ 'quality_score': 4,
81
+ 'bleu': 2,
82
+ 'chrf': 4,
83
+ 'rouge1': 4,
84
+ 'rouge2': 4,
85
+ 'rougeL': 4,
86
+ 'cer': 4,
87
+ 'wer': 4,
88
+ 'len_ratio': 3,
89
+ 'coverage_rate': 1 # percentage
90
+ }
91
+ }
92
+
93
+ # Chart colors and styling
94
+ CHART_CONFIG = {
95
+ 'google_comparable_color': '#1f77b4',
96
+ 'ug40_only_color': '#ff7f0e',
97
+ 'primary_colorscale': 'Viridis',
98
+ 'secondary_colorscale': 'Plasma',
99
+ 'bar_height_per_model': 30,
100
+ 'min_chart_height': 400,
101
+ 'max_chart_height': 1000
102
  }