<commit_before>package hex.glm;


import hex.GridSearch;
import hex.glm.GLM2.GLMGridSearch;
import water.*;
import water.api.*;
import water.api.RequestServer.API_VERSION;

import com.google.gson.JsonObject;

public class GLMProgressPage2 extends Progress2 {
  /** Return {@link Response} for finished job. */
  @Override
  protected Response jobDone(final Job job, final Key dst) {
    JsonObject args = new JsonObject();
    args.addProperty(MODEL_KEY, job.dest().toString());
    return GLMModelView.redirect(this, job.dest());
  }
  public static Response redirect(Request req, Key jobkey, Key dest) {
    return Response.redirect(req, "/2/GLMProgressPage2", JOB_KEY, jobkey, DEST_KEY, dest );
  }
  @Override public boolean toHTML( StringBuilder sb ) {
    Job jjob = Job.findJob(job_key);
    Value v = DKV.get(jjob.dest());
    if(v != null){
      GLMModel m = v.get();
      m.generateHTML("GLM Model", sb);
    } else
      sb.append("<b>No model yet.</b>");
    return true;
  }


  public static class GLMGrid extends Progress2 {
    API_VERSION _v;
    boolean _isDone;
    public static Response redirect(Request req, Key jobkey, Key dest,API_VERSION v) {
      return new Response(Response.Status.redirect, req, -1, -1, href2(v), JOB_KEY, jobkey, DEST_KEY, dest );
    }

    private static String href2(API_VERSION v) {
      return v.prefix() + "GLMGrid";
    }
    @Override protected String href(API_VERSION v) {
      return href2(v);
    }
    @Override public boolean toHTML(StringBuilder sb) {
      try{
        GLM2.GLMGrid grid = UKV.get(destination_key);
        grid.toHTML(sb);
      }catch(Throwable t){
//        t.printStackTrace();
      }
      return true;
    }
    @Override protected Response jobDone(final Job job, final Key dst) {
      _isDone = true;
      return new Response(Response.Status.done, this, 0, 0, null);
    }
  }
}
<commit_msg>Removed warning in GLMProgressPage2.<commit_after>package hex.glm;


import hex.GridSearch;
import hex.glm.GLM2.GLMGridSearch;
import water.*;
import water.api.*;
import water.api.RequestServer.API_VERSION;

import com.google.gson.JsonObject;

public class GLMProgressPage2 extends Progress2 {
  /** Return {@link Response} for finished job. */
  @Override
  protected Response jobDone(final Job job, final Key dst) {
    JsonObject args = new JsonObject();
    args.addProperty(MODEL_KEY, job.dest().toString());
    return GLMModelView.redirect(this, job.dest());
  }
  public static Response redirect(Request req, Key jobkey, Key dest) {
    return Response.redirect(req, "/2/GLMProgressPage2", JOB_KEY, jobkey, DEST_KEY, dest );
  }
  @Override public boolean toHTML( StringBuilder sb ) {
    Job jjob = Job.findJob(job_key);
    Value v = DKV.get(jjob.dest());
    if(v != null){
      GLMModel m = v.get();
      m.generateHTML("GLM Model", sb);
    } else
      sb.append("<b>No model yet.</b>");
    return true;
  }


  public static class GLMGrid extends Progress2 {
    API_VERSION _v;
    boolean _isDone;
    public static Response redirect(Request req, Key jobkey, Key dest,API_VERSION v) {
      return new Response(Response.Status.redirect, req, -1, -1, href2(v), JOB_KEY, jobkey, DEST_KEY, dest );
    }

    private static String href2(API_VERSION v) {
      return v.prefix() + "GLMGrid";
    }
    @Override protected String href(API_VERSION v) {
      return href2(v);
    }
    @Override public boolean toHTML(StringBuilder sb) {
      try{
        GLM2.GLMGrid grid = UKV.get(destination_key);
        grid.toHTML(sb);
      }catch(Throwable t){
//        t.printStackTrace();
      }
      return true;
    }
    @Override protected Response jobDone(final Job job, final Key dst) {
      _isDone = true;
      return new Response(Response.Status.done, this, 0, 0);
    }
  }
}

{'fraction_non_alphanumeric': 0.11941875825627477, 'fraction_numerical': 0.007661822985468956, 'mean_word_length': 3.1696035242290748, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2129690', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1208, 'n_words': 330}