You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
intlimit = ((1<<16) /* Max size of class */ - 4 * 500/* Free space for loading any static stuff */ ) / (4*2*2); // Static initialized needs 4 instructions to load String from constant pool + load ColInfo
662
-
return_names.length < limit ?
663
-
JCodeGen.toStaticVar(sb, "NAMES", _names, "Names of columns used by model.") :
664
-
JCodeGen.toStaticVar(sb, "NAMES", JCodeGen.EMPTY_SA, "Names of columns used by model. WARNING: It is too large to be generated!");
651
+
privateSBtoJavaNAMES(SBsb, SBfileContextSB) {
652
+
StringnamesHolderClassName = "NamesHolder";
653
+
sb.i().p("// ").p("Names of columns used by model.").nl();
654
+
sb.i().p("public static final String[] NAMES = NamesHolder.VALUES;").nl();
655
+
// Generate class which fills the names into array
656
+
fileContextSB.i().p("// The class representing training column names ").nl();
protectedSBtoJavaNCLASSES( SBsb ) { returnisClassifier() ? JCodeGen.toStaticVar(sb, "NCLASSES", nclasses(), "Number of output classes included in training data response column.") : sb; }
0 commit comments