@@ -7,7 +7,6 @@ class TrainingDashboard {
77 this . metricsGrid = document . querySelector ( '.metrics-grid' ) ;
88 this . lossChart = document . getElementById ( 'lossChart' ) ;
99 this . accChart = document . getElementById ( 'accuracyChart' ) ;
10- this . testChart = document . getElementById ( 'testAccuracyChart' ) ;
1110 this . predictionsGrid = document . getElementById ( 'predictionsGrid' ) ;
1211 this . imagesGrid = document . getElementById ( 'imagesGrid' ) ;
1312 this . statusBadge = document . getElementById ( 'trainingStatus' ) ;
@@ -167,10 +166,8 @@ class TrainingDashboard {
167166 } ;
168167 const lossSrc = outputs ?. train_loss_image || 'images/train_loss.png' ;
169168 const accSrc = outputs ?. train_accuracy_image || 'images/train_accuracy.png' ;
170- const testSrc = outputs ?. test_accuracy_image || 'images/test_accuracy.png' ;
171169 ensureImg ( this . lossChart , lossSrc , 'Training Loss' ) ;
172170 ensureImg ( this . accChart , accSrc , 'Training Accuracy' ) ;
173- ensureImg ( this . testChart , testSrc , 'Test Accuracy' ) ;
174171 }
175172
176173 parseKV ( text ) {
@@ -189,10 +186,10 @@ class TrainingDashboard {
189186
190187 applyOutputs ( kv ) {
191188 const num = x => ( x === undefined || x === '' ? null : parseFloat ( x ) ) ;
192- this . state . totalEpochs = kv . total_epochs ? parseInt ( kv . total_epochs , 10 ) : null ;
193- this . state . finalTrainAccuracy = num ( kv . final_train_accuracy ) ;
194- this . state . testAccuracy = num ( kv . test_accuracy ) ;
195- this . state . testLoss = num ( kv . test_loss ) ;
189+ if ( kv . total_epochs ) this . state . totalEpochs = parseInt ( kv . total_epochs , 10 ) ;
190+ if ( kv . final_train_accuracy !== undefined ) this . state . finalTrainAccuracy = num ( kv . final_train_accuracy ) ;
191+ if ( kv . test_accuracy !== undefined ) this . state . testAccuracy = num ( kv . test_accuracy ) ;
192+ if ( kv . test_loss !== undefined ) this . state . testLoss = num ( kv . test_loss ) ;
196193
197194 // Render predictions stub if we have per-sample labels
198195 const preds = [ ] ;
0 commit comments