@@ -1250,6 +1250,16 @@ public double calcOutlierThreshold(Vec mse, double quantile) {
1250
1250
return qp .result ;
1251
1251
}
1252
1252
1253
+ @ Override public ModelAutobufferSerializer getModelSerializer () {
1254
+ // Return a serializer which knows how to serialize keys
1255
+ return new ModelAutobufferSerializer () {
1256
+ @ Override protected AutoBuffer postLoad (Model m , AutoBuffer ab ) {
1257
+ Job .hygiene (((DeepLearningModel )m ).get_params ());
1258
+ return ab ;
1259
+ }
1260
+ };
1261
+ }
1262
+
1253
1263
public boolean generateHTML (String title , StringBuilder sb ) {
1254
1264
if (_key == null ) {
1255
1265
DocGen .HTML .title (sb , "No model yet" );
@@ -1271,15 +1281,14 @@ public boolean generateHTML(String title, StringBuilder sb) {
1271
1281
(get_params ().validation != null && DKV .get (get_params ().validation ._key ) == null )) (Job .hygiene (get_params ())).toHTML (sb );
1272
1282
else job ().toHTML (sb );
1273
1283
1274
- final Key val_key = get_params ().validation != null ? get_params ().validation ._key : null ;
1275
1284
sb .append ("<div class='alert'>Actions: "
1276
1285
+ (jobKey != null && UKV .get (jobKey ) != null && Job .isRunning (jobKey ) ? "<i class=\" icon-stop\" ></i>" + Cancel .link (jobKey , "Stop training" ) + ", " : "" )
1277
1286
+ Inspect2 .link ("Inspect training data (" + _dataKey + ")" , _dataKey ) + ", "
1278
- + (val_key != null ? (Inspect2 .link ("Inspect validation data (" + val_key + ")" , val_key ) + ", " ) : "" )
1287
+ + (_validationKey != null ? (Inspect2 .link ("Inspect validation data (" + _validationKey + ")" , _validationKey ) + ", " ) : "" )
1279
1288
+ water .api .Predict .link (_key , "Score on dataset" ) + ", "
1280
- + DeepLearning .link (_dataKey , "Compute new model" , null , responseName (), val_key )
1289
+ + DeepLearning .link (_dataKey , "Compute new model" , null , responseName (), _validationKey )
1281
1290
+ (actual_best_model_key != null && UKV .get (actual_best_model_key ) != null && actual_best_model_key != _key ? ", " + DeepLearningModelView .link ("Go to best model" , actual_best_model_key ) : "" )
1282
- + (jobKey == null || ((jobKey != null && UKV .get (jobKey ) == null )) || (jobKey != null && UKV .get (jobKey ) != null && Job .isEnded (jobKey )) ? ", <i class=\" icon-play\" ></i>" + DeepLearning .link (_dataKey , "Continue training this model" , _key , responseName (), val_key ) : "" ) + ", "
1291
+ + (jobKey == null || ((jobKey != null && UKV .get (jobKey ) == null )) || (jobKey != null && UKV .get (jobKey ) != null && Job .isEnded (jobKey )) ? ", <i class=\" icon-play\" ></i>" + DeepLearning .link (_dataKey , "Continue training this model" , _key , responseName (), _validationKey ) : "" ) + ", "
1283
1292
+ UIUtils .qlink (SaveModel .class , "model" , _key , "Save model" ) + ", "
1284
1293
+ "</div>" );
1285
1294
0 commit comments