Search in sources :

Example 1 with Job

use of water.Job in project h2o-2 by h2oai.

the class NeuralNetProgressPage method toHTML.

@Override
public boolean toHTML(StringBuilder sb) {
    Job jjob = Job.findJob(job_key);
    if (jjob == null)
        return true;
    NeuralNet.NeuralNetModel m = UKV.get(jjob.dest());
    if (m != null)
        m.generateHTML("NeuralNet Model", sb);
    else
        DocGen.HTML.paragraph(sb, "Pending...");
    return true;
}
Also used : NeuralNet(hex.NeuralNet) Job(water.Job)

Example 2 with Job

use of water.Job in project h2o-2 by h2oai.

the class RemoveAll method serve.

@Override
protected Response serve() {
    try {
        Log.info("Removing all keys for the cluster");
        // First cancel all jobs and wait for them to be done.
        Log.info("Cancelling all jobs...");
        for (Job job : Job.all()) {
            job.cancel();
            Job.waitUntilJobEnded(job.self());
        }
        Log.info("Finished cancelling all jobs");
        RemoveAllKeysTask collector = new RemoveAllKeysTask();
        collector.invokeOnAllNodes();
        Log.info("Finished removing keys");
    } catch (Throwable e) {
        return Response.error(e);
    }
    JsonObject response = new JsonObject();
    return Response.done(response);
}
Also used : RemoveAllKeysTask(water.util.RemoveAllKeysTask) JsonObject(dontweave.gson.JsonObject) Job(water.Job)

Example 3 with Job

use of water.Job in project h2o-3 by h2oai.

the class RemoveAllHandler method remove.

// called through reflection by RequestServer
@SuppressWarnings("unused")
public RemoveAllV3 remove(int version, RemoveAllV3 u) {
    Log.info("Removing all objects");
    Futures fs = new Futures();
    // Cancel and remove leftover running jobs
    for (Job j : Job.jobs()) {
        j.stop_requested();
        j.remove(fs);
    }
    // Wipe out any and all session info
    if (RapidsHandler.SESSIONS != null) {
        for (String k : RapidsHandler.SESSIONS.keySet()) (RapidsHandler.SESSIONS.get(k)).endQuietly(null);
        RapidsHandler.SESSIONS.clear();
    }
    fs.blockForPending();
    // Bulk brainless key removal.  Completely wipes all Keys without regard.
    new MRTask(H2O.MIN_HI_PRIORITY) {

        @Override
        public void setupLocal() {
            H2O.raw_clear();
            water.fvec.Vec.ESPC.clear();
        }
    }.doAllNodes();
    // Wipe the backing store without regard as well
    H2O.getPM().getIce().cleanUp();
    Log.info("Finished removing objects");
    return u;
}
Also used : Futures(water.Futures) MRTask(water.MRTask) Job(water.Job)

Example 4 with Job

use of water.Job in project h2o-3 by h2oai.

the class SplitFrameHandler method run.

public SplitFrameV3 run(int version, SplitFrameV3 sf) {
    SplitFrame splitFrame = sf.createAndFillImpl();
    Job job = splitFrame.exec();
    SplitFrameV3 spv3 = new SplitFrameV3(splitFrame);
    spv3.key = new KeyV3.JobKeyV3(job._key);
    return spv3;
}
Also used : SplitFrameV3(water.api.schemas3.SplitFrameV3) SplitFrame(hex.SplitFrame) Job(water.Job) KeyV3(water.api.schemas3.KeyV3)

Example 5 with Job

use of water.Job in project h2o-2 by h2oai.

the class SpeeDRFProgressPage method toHTML.

@Override
public boolean toHTML(StringBuilder sb) {
    Job jjob = Job.findJob(job_key);
    if (jjob == null)
        return true;
    Value v = DKV.get(jjob.dest());
    if (v != null) {
        SpeeDRFModel m = v.get();
        m.generateHTML("SpeeDRF", sb);
    } else
        sb.append("<b>No model yet.</b>");
    return true;
}
Also used : Value(water.Value) Job(water.Job)

Aggregations

Job (water.Job)19 Frame (water.fvec.Frame)7 Test (org.junit.Test)5 Value (water.Value)3 JsonObject (dontweave.gson.JsonObject)2 Ignore (org.junit.Ignore)2 JsonArray (dontweave.gson.JsonArray)1 JsonElement (dontweave.gson.JsonElement)1 Model (hex.Model)1 NeuralNet (hex.NeuralNet)1 SplitFrame (hex.SplitFrame)1 DeepLearningModel (hex.deeplearning.DeepLearningModel)1 DRFModel (hex.drf.DRF.DRFModel)1 Quantile (hex.quantile.Quantile)1 QuantileModel (hex.quantile.QuantileModel)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 Date (java.util.Date)1 Futures (water.Futures)1 Key (water.Key)1 MRTask (water.MRTask)1