Exemplo n.º 1
0
 @Override
 public void cancel(Throwable ex) {
   if (isCancelledOrCrashed()) return;
   if (_model != null) _model.unlock(self());
   if (ex instanceof JobCancelledException) {
     if (!isCancelledOrCrashed()) cancel();
   } else super.cancel(ex);
 }
Exemplo n.º 2
0
 protected void complete() {
   if (_addedL2 > 0) {
     String warn = "Added L2 penalty (rho = " + _addedL2 + ")  due to non-spd matrix. ";
     if (_model.warnings == null || _model.warnings.length == 0)
       _model.warnings = new String[] {warn};
     else {
       _model.warnings = Arrays.copyOf(_model.warnings, _model.warnings.length + 1);
       _model.warnings[_model.warnings.length - 1] = warn;
     }
     _model.update(self());
   }
   _model.unlock(self());
   if (_dinfo._nfolds == 0) remove(); // Remove/complete job only for top-level, not xval GLM2s
   if (_fjtask != null) _fjtask.tryComplete();
 }
Exemplo n.º 3
0
 @Override
 protected void map(GLMModel glmModel) {
   glmModel._output.pickBestModel(false);
   glmModel.update(_jobKey);
   glmModel.unlock(_jobKey);
 }
Exemplo n.º 4
0
 @Override
 public void cancel(Throwable ex) {
   if (_model != null) _model.unlock(self());
   if (ex instanceof JobCancelledException) cancel();
   else super.cancel(ex);
 }