You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix broken parsing for --cv-threshold and --max-increases so the value after
the equals sign is used.
Use the configured CV threshold when checking overall stability and
report the configured thresholds in calibrate-n output. Also handle
invalid numeric values for --runs and --cv-threshold consistently with
the other numeric options.
Signed-off-by: Luan Muniz <luan@luanmuniz.com.br>
// Check if overall CV is below CV_THRESHOLD and no configuration has CV > 10%
217
+
// Check if overall CV is below cvThreshold and no configuration has CV > MAX_CV_THRESHOLD
207
218
if(isOverallStable&&!hasVeryUnstableConfigs){
208
-
console.log(styleText(['bold','green'],` ✓ Overall CV is below 5% and no configuration has CV above 10%`));
219
+
console.log(styleText(['bold','green'],` ✓ Overall CV is below ${cvThresholdPercentage}% and no configuration has CV above ${MAX_CV_THRESHOLD*100}%`));
209
220
}else{
210
221
if(!isOverallStable){
211
-
console.log(styleText(['bold','red'],` ✗ Overall CV (${(avgCV*100).toFixed(2)}%) is above 5%`));
222
+
console.log(styleText(['bold','red'],` ✗ Overall CV (${(avgCV*100).toFixed(2)}%) is above ${cvThresholdPercentage}%`));
212
223
}
213
224
if(hasVeryUnstableConfigs){
214
-
console.log(styleText(['bold','red'],` ✗ ${tooUnstableConfigs.length} configuration(s) have CV above 10%`));
225
+
console.log(styleText(['bold','red'],` ✗ ${tooUnstableConfigs.length} configuration(s) have CV above ${MAX_CV_THRESHOLD*100}%`));
215
226
}
216
227
}
217
228
@@ -226,7 +237,7 @@ Configuration:
226
237
bestGroupStats.push({
227
238
conf: group.conf,
228
239
stats: stats,
229
-
isStable: stats.cv<=0.10,
240
+
isStable: stats.cv<=MAX_CV_THRESHOLD,
230
241
});
231
242
}
232
243
}
@@ -237,15 +248,15 @@ Configuration:
237
248
}
238
249
239
250
// Check if we've reached acceptable stability based on new criteria
240
-
// 1. Overall CV should be below CV_THRESHOLD
241
-
// 2. No configuration should have a CV greater than 10%
251
+
// 1. Overall CV should be below cvThreshold
252
+
// 2. No configuration should have a CV greater than MAX_CV_THRESHOLD
console.log(`\n✓ Found optimal n=${n} (Overall CV=${(avgCV*100).toFixed(2)}% < 5% and no configuration has CV > 10%)`);
259
+
console.log(`\n✓ Found optimal n=${n} (Overall CV=${(avgCV*100).toFixed(2)}% < ${cvThresholdPercentage}% and no configuration has CV > ${MAX_CV_THRESHOLD*100}%)`);
249
260
console.log('\nFinal CV for each configuration:');
0 commit comments