id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
131,100
h2oai/h2o-3
h2o-mapreduce-generic/src/main/java/water/ProxyStarter.java
ProxyStarter.main
public static void main(String[] args) { Credentials cred = new Credentials(System.getProperty("user.name"), "Heslo123"); String url = start(args, cred, "https://localhost:54321/", false); System.out.println("Proxy started on " + url + " " + cred.toDebugString()); }
java
public static void main(String[] args) { Credentials cred = new Credentials(System.getProperty("user.name"), "Heslo123"); String url = start(args, cred, "https://localhost:54321/", false); System.out.println("Proxy started on " + url + " " + cred.toDebugString()); }
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "Credentials", "cred", "=", "new", "Credentials", "(", "System", ".", "getProperty", "(", "\"user.name\"", ")", ",", "\"Heslo123\"", ")", ";", "String", "url", "=", "start", "...
just for local testing
[ "just", "for", "local", "testing" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-mapreduce-generic/src/main/java/water/ProxyStarter.java#L111-L115
131,101
h2oai/h2o-3
h2o-automl/src/main/java/ai/h2o/automl/targetencoding/TargetEncoderFrameHelper.java
TargetEncoderFrameHelper.uniqueValuesBy
static Frame uniqueValuesBy(Frame fr, int columnIndex) { Vec vec0 = fr.vec(columnIndex); Vec v; if (vec0.isCategorical()) { v = Vec.makeSeq(0, (long) vec0.domain().length, true); v.setDomain(vec0.domain()); DKV.put(v); } else { UniqTask t = new UniqTask().doAll(vec0); int n...
java
static Frame uniqueValuesBy(Frame fr, int columnIndex) { Vec vec0 = fr.vec(columnIndex); Vec v; if (vec0.isCategorical()) { v = Vec.makeSeq(0, (long) vec0.domain().length, true); v.setDomain(vec0.domain()); DKV.put(v); } else { UniqTask t = new UniqTask().doAll(vec0); int n...
[ "static", "Frame", "uniqueValuesBy", "(", "Frame", "fr", ",", "int", "columnIndex", ")", "{", "Vec", "vec0", "=", "fr", ".", "vec", "(", "columnIndex", ")", ";", "Vec", "v", ";", "if", "(", "vec0", ".", "isCategorical", "(", ")", ")", "{", "v", "="...
return a frame with unique values from the specified column
[ "return", "a", "frame", "with", "unique", "values", "from", "the", "specified", "column" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-automl/src/main/java/ai/h2o/automl/targetencoding/TargetEncoderFrameHelper.java#L62-L83
131,102
h2oai/h2o-3
h2o-core/src/main/java/water/api/Route.java
Route.markdown
public StringBuffer markdown(Schema sinput, Schema soutput) { MarkdownBuilder builder = new MarkdownBuilder(); builder.comment("Preview with http://jbt.github.io/markdown-editor"); builder.heading1(_http_method, _url); builder.hline(); builder.paragraph(_summary); // parameters and output tables...
java
public StringBuffer markdown(Schema sinput, Schema soutput) { MarkdownBuilder builder = new MarkdownBuilder(); builder.comment("Preview with http://jbt.github.io/markdown-editor"); builder.heading1(_http_method, _url); builder.hline(); builder.paragraph(_summary); // parameters and output tables...
[ "public", "StringBuffer", "markdown", "(", "Schema", "sinput", ",", "Schema", "soutput", ")", "{", "MarkdownBuilder", "builder", "=", "new", "MarkdownBuilder", "(", ")", ";", "builder", ".", "comment", "(", "\"Preview with http://jbt.github.io/markdown-editor\"", ")",...
Generate Markdown documentation for this Route.
[ "Generate", "Markdown", "documentation", "for", "this", "Route", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/Route.java#L71-L83
131,103
h2oai/h2o-3
h2o-algos/src/main/java/hex/deeplearning/DeepLearningTask.java
DeepLearningTask.processMiniBatch
@Override public void processMiniBatch(long seed, double[] responses, double[] offsets, int n) { assert(_training); if (_localmodel.get_params()._reproducible) { seed += _localmodel.get_processed_global(); //avoid periodicity } else { seed = _dropout_rng.nextLong(); // non-reproducible case - ma...
java
@Override public void processMiniBatch(long seed, double[] responses, double[] offsets, int n) { assert(_training); if (_localmodel.get_params()._reproducible) { seed += _localmodel.get_processed_global(); //avoid periodicity } else { seed = _dropout_rng.nextLong(); // non-reproducible case - ma...
[ "@", "Override", "public", "void", "processMiniBatch", "(", "long", "seed", ",", "double", "[", "]", "responses", ",", "double", "[", "]", "offsets", ",", "int", "n", ")", "{", "assert", "(", "_training", ")", ";", "if", "(", "_localmodel", ".", "get_p...
Apply the gradient to update the weights @param seed @param responses @param offsets @param n number of trained examples in this last mini batch (usually == mini_batch_size, but can be less)
[ "Apply", "the", "gradient", "to", "update", "the", "weights" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/deeplearning/DeepLearningTask.java#L118-L127
131,104
h2oai/h2o-3
h2o-algos/src/main/java/hex/deeplearning/DeepLearningTask.java
DeepLearningTask.bpropMiniBatch
static public void bpropMiniBatch(Neurons[] neurons, int n) { neurons[neurons.length - 1].bpropOutputLayer(n); for (int i = neurons.length - 2; i > 0; --i) neurons[i].bprop(n); for (int mb=0;mb<n;++mb) { // all errors are reset to 0 for (int i = 0; i<neurons.length ;++i) { Storage...
java
static public void bpropMiniBatch(Neurons[] neurons, int n) { neurons[neurons.length - 1].bpropOutputLayer(n); for (int i = neurons.length - 2; i > 0; --i) neurons[i].bprop(n); for (int mb=0;mb<n;++mb) { // all errors are reset to 0 for (int i = 0; i<neurons.length ;++i) { Storage...
[ "static", "public", "void", "bpropMiniBatch", "(", "Neurons", "[", "]", "neurons", ",", "int", "n", ")", "{", "neurons", "[", "neurons", ".", "length", "-", "1", "]", ".", "bpropOutputLayer", "(", "n", ")", ";", "for", "(", "int", "i", "=", "neurons"...
Helper to apply back-propagation without clearing out the gradients afterwards Used for gradient checking @param neurons @param n number of trained examples in this last mini batch (usually == mini_batch_size, but can be less)
[ "Helper", "to", "apply", "back", "-", "propagation", "without", "clearing", "out", "the", "gradients", "afterwards", "Used", "for", "gradient", "checking" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/deeplearning/DeepLearningTask.java#L135-L148
131,105
h2oai/h2o-3
h2o-core/src/main/java/hex/schemas/ModelBuilderSchema.java
ModelBuilderSchema.createParametersSchema
final public P createParametersSchema() { // special case, because ModelBuilderSchema is the top of the tree and is parameterized differently if (ModelBuilderSchema.class == this.getClass()) { return (P)new ModelParametersSchemaV3(); } try { Class<? extends ModelParametersSchemaV3> paramete...
java
final public P createParametersSchema() { // special case, because ModelBuilderSchema is the top of the tree and is parameterized differently if (ModelBuilderSchema.class == this.getClass()) { return (P)new ModelParametersSchemaV3(); } try { Class<? extends ModelParametersSchemaV3> paramete...
[ "final", "public", "P", "createParametersSchema", "(", ")", "{", "// special case, because ModelBuilderSchema is the top of the tree and is parameterized differently", "if", "(", "ModelBuilderSchema", ".", "class", "==", "this", ".", "getClass", "(", ")", ")", "{", "return"...
Factory method to create the model-specific parameters schema.
[ "Factory", "method", "to", "create", "the", "model", "-", "specific", "parameters", "schema", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/schemas/ModelBuilderSchema.java#L68-L81
131,106
h2oai/h2o-3
h2o-core/src/main/java/hex/schemas/ModelBuilderSchema.java
ModelBuilderSchema.fillFromImpl
@Override public S fillFromImpl(B builder) { // DO NOT, because it can already be running: builder.init(false); // check params this.algo = builder._parms.algoName().toLowerCase(); this.algo_full_name = builder._parms.fullName(); this.supervised = builder.isSupervised(); this.can_build = builder.c...
java
@Override public S fillFromImpl(B builder) { // DO NOT, because it can already be running: builder.init(false); // check params this.algo = builder._parms.algoName().toLowerCase(); this.algo_full_name = builder._parms.fullName(); this.supervised = builder.isSupervised(); this.can_build = builder.c...
[ "@", "Override", "public", "S", "fillFromImpl", "(", "B", "builder", ")", "{", "// DO NOT, because it can already be running: builder.init(false); // check params", "this", ".", "algo", "=", "builder", ".", "_parms", ".", "algoName", "(", ")", ".", "toLowerCase", "(",...
Generic filling from the impl
[ "Generic", "filling", "from", "the", "impl" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/schemas/ModelBuilderSchema.java#L101-L131
131,107
h2oai/h2o-3
h2o-algos/src/main/java/hex/word2vec/WordVectorTrainer.java
WordVectorTrainer.cheapRandInt
private int cheapRandInt(int max) { _seed ^= ( _seed << 21); _seed ^= ( _seed >>> 35); _seed ^= ( _seed << 4); int r = (int) _seed % max; return r > 0 ? r : -r; }
java
private int cheapRandInt(int max) { _seed ^= ( _seed << 21); _seed ^= ( _seed >>> 35); _seed ^= ( _seed << 4); int r = (int) _seed % max; return r > 0 ? r : -r; }
[ "private", "int", "cheapRandInt", "(", "int", "max", ")", "{", "_seed", "^=", "(", "_seed", "<<", "21", ")", ";", "_seed", "^=", "(", "_seed", ">>>", "35", ")", ";", "_seed", "^=", "(", "_seed", "<<", "4", ")", ";", "int", "r", "=", "(", "int",...
This is cheap and moderate in quality. @param max - Upper range limit. @return int between 0-(max-1).
[ "This", "is", "cheap", "and", "moderate", "in", "quality", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/word2vec/WordVectorTrainer.java#L205-L211
131,108
h2oai/h2o-3
h2o-core/src/main/java/water/rapids/RadixCount.java
RadixCount.getKey
static Key getKey(boolean isLeft, int col, H2ONode node) { return Key.make("__radix_order__MSBNodeCounts_col" + col + "_node" + node.index() + (isLeft ? "_LEFT" : "_RIGHT")); // Each node's contents is different so the node number needs to be in the key // TODO: need the biggestBit in here too, that the MSB...
java
static Key getKey(boolean isLeft, int col, H2ONode node) { return Key.make("__radix_order__MSBNodeCounts_col" + col + "_node" + node.index() + (isLeft ? "_LEFT" : "_RIGHT")); // Each node's contents is different so the node number needs to be in the key // TODO: need the biggestBit in here too, that the MSB...
[ "static", "Key", "getKey", "(", "boolean", "isLeft", ",", "int", "col", ",", "H2ONode", "node", ")", "{", "return", "Key", ".", "make", "(", "\"__radix_order__MSBNodeCounts_col\"", "+", "col", "+", "\"_node\"", "+", "node", ".", "index", "(", ")", "+", "...
make it homed to the owning node
[ "make", "it", "homed", "to", "the", "owning", "node" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/rapids/RadixCount.java#L35-L39
131,109
h2oai/h2o-3
h2o-core/src/main/java/hex/createframe/CreateFrameRecipe.java
CreateFrameRecipe.fillMissingParameters
protected void fillMissingParameters() { if (dest == null) { dest = Key.make(); } if (seed == -1) { seed = new Random().nextLong(); Log.info("Generated seed: " + seed); } }
java
protected void fillMissingParameters() { if (dest == null) { dest = Key.make(); } if (seed == -1) { seed = new Random().nextLong(); Log.info("Generated seed: " + seed); } }
[ "protected", "void", "fillMissingParameters", "(", ")", "{", "if", "(", "dest", "==", "null", ")", "{", "dest", "=", "Key", ".", "make", "(", ")", ";", "}", "if", "(", "seed", "==", "-", "1", ")", "{", "seed", "=", "new", "Random", "(", ")", "....
Resolve parameter values that cannot be initialized to static defaults. If you're overriding this method, please make sure to invoke the super implementation as well.
[ "Resolve", "parameter", "values", "that", "cannot", "be", "initialized", "to", "static", "defaults", ".", "If", "you", "re", "overriding", "this", "method", "please", "make", "sure", "to", "invoke", "the", "super", "implementation", "as", "well", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/createframe/CreateFrameRecipe.java#L62-L70
131,110
h2oai/h2o-3
h2o-core/src/main/java/hex/Distribution.java
Distribution.exp
public static double exp(double x) { double val = Math.min(MAX, Math.exp(x)); // if (val == MAX) Log.warn("Exp overflow: exp(" + x + ") truncated to " + MAX); return val; }
java
public static double exp(double x) { double val = Math.min(MAX, Math.exp(x)); // if (val == MAX) Log.warn("Exp overflow: exp(" + x + ") truncated to " + MAX); return val; }
[ "public", "static", "double", "exp", "(", "double", "x", ")", "{", "double", "val", "=", "Math", ".", "min", "(", "MAX", ",", "Math", ".", "exp", "(", "x", ")", ")", ";", "// if (val == MAX) Log.warn(\"Exp overflow: exp(\" + x + \") truncated to \" + MAX);", ...
helper - sanitized exponential function
[ "helper", "-", "sanitized", "exponential", "function" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Distribution.java#L43-L47
131,111
h2oai/h2o-3
h2o-core/src/main/java/hex/Distribution.java
Distribution.log
public static double log(double x) { x = Math.max(0,x); double val = x == 0 ? MIN_LOG : Math.max(MIN_LOG, Math.log(x)); // if (val == MIN_LOG) Log.warn("Log underflow: log(" + x + ") truncated to " + MIN_LOG); return val; }
java
public static double log(double x) { x = Math.max(0,x); double val = x == 0 ? MIN_LOG : Math.max(MIN_LOG, Math.log(x)); // if (val == MIN_LOG) Log.warn("Log underflow: log(" + x + ") truncated to " + MIN_LOG); return val; }
[ "public", "static", "double", "log", "(", "double", "x", ")", "{", "x", "=", "Math", ".", "max", "(", "0", ",", "x", ")", ";", "double", "val", "=", "x", "==", "0", "?", "MIN_LOG", ":", "Math", ".", "max", "(", "MIN_LOG", ",", "Math", ".", "l...
helper - sanitized log function
[ "helper", "-", "sanitized", "log", "function" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Distribution.java#L50-L55
131,112
h2oai/h2o-3
h2o-core/src/main/java/hex/Distribution.java
Distribution.deviance
public double deviance(double w, double y, double f) { switch (distribution) { case AUTO: case gaussian: return w * (y - f) * (y - f); // leads to wMSE case huber: if (Math.abs(y-f) <= huberDelta) { return w * (y - f) * (y - f); // same as wMSE } else { ...
java
public double deviance(double w, double y, double f) { switch (distribution) { case AUTO: case gaussian: return w * (y - f) * (y - f); // leads to wMSE case huber: if (Math.abs(y-f) <= huberDelta) { return w * (y - f) * (y - f); // same as wMSE } else { ...
[ "public", "double", "deviance", "(", "double", "w", ",", "double", "y", ",", "double", "f", ")", "{", "switch", "(", "distribution", ")", "{", "case", "AUTO", ":", "case", "gaussian", ":", "return", "w", "*", "(", "y", "-", "f", ")", "*", "(", "y...
Deviance of given distribution function at predicted value f @param w observation weight @param y (actual) response @param f (predicted) response in original response space (including offset) @return deviance
[ "Deviance", "of", "given", "distribution", "function", "at", "predicted", "value", "f" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Distribution.java#L69-L115
131,113
h2oai/h2o-3
h2o-core/src/main/java/hex/Distribution.java
Distribution.initFNum
public double initFNum(double w, double o, double y) { switch (distribution) { case AUTO: case gaussian: case bernoulli: case quasibinomial: case multinomial: return w*(y-o); case poisson: return w*y; case gamma: return w*y*linkInv(-o); case tw...
java
public double initFNum(double w, double o, double y) { switch (distribution) { case AUTO: case gaussian: case bernoulli: case quasibinomial: case multinomial: return w*(y-o); case poisson: return w*y; case gamma: return w*y*linkInv(-o); case tw...
[ "public", "double", "initFNum", "(", "double", "w", ",", "double", "o", ",", "double", "y", ")", "{", "switch", "(", "distribution", ")", "{", "case", "AUTO", ":", "case", "gaussian", ":", "case", "bernoulli", ":", "case", "quasibinomial", ":", "case", ...
Contribution to numerator for initial value computation @param w weight @param o offset @param y response @return weighted contribution to numerator
[ "Contribution", "to", "numerator", "for", "initial", "value", "computation" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Distribution.java#L204-L223
131,114
h2oai/h2o-3
h2o-core/src/main/java/hex/Distribution.java
Distribution.gammaNum
public double gammaNum(double w, double y, double z, double f) { switch (distribution) { case gaussian: case bernoulli: case quasibinomial: case multinomial: return w * z; case poisson: return w * y; case gamma: return w * (z+1); //z+1 == y*exp(-f) c...
java
public double gammaNum(double w, double y, double z, double f) { switch (distribution) { case gaussian: case bernoulli: case quasibinomial: case multinomial: return w * z; case poisson: return w * y; case gamma: return w * (z+1); //z+1 == y*exp(-f) c...
[ "public", "double", "gammaNum", "(", "double", "w", ",", "double", "y", ",", "double", "z", ",", "double", "f", ")", "{", "switch", "(", "distribution", ")", "{", "case", "gaussian", ":", "case", "bernoulli", ":", "case", "quasibinomial", ":", "case", ...
Contribution to numerator for GBM's leaf node prediction @param w weight @param y response @param z residual @param f predicted value (including offset) @return weighted contribution to numerator
[ "Contribution", "to", "numerator", "for", "GBM", "s", "leaf", "node", "prediction" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Distribution.java#L260-L281
131,115
h2oai/h2o-3
h2o-core/src/main/java/hex/Distribution.java
Distribution.gammaDenom
public double gammaDenom(double w, double y, double z, double f) { switch (distribution) { case gaussian: case gamma: return w; case bernoulli: case quasibinomial: double ff = y-z; return w * ff*(1-ff); case multinomial: double absz = Math.abs(z); ...
java
public double gammaDenom(double w, double y, double z, double f) { switch (distribution) { case gaussian: case gamma: return w; case bernoulli: case quasibinomial: double ff = y-z; return w * ff*(1-ff); case multinomial: double absz = Math.abs(z); ...
[ "public", "double", "gammaDenom", "(", "double", "w", ",", "double", "y", ",", "double", "z", ",", "double", "f", ")", "{", "switch", "(", "distribution", ")", "{", "case", "gaussian", ":", "case", "gamma", ":", "return", "w", ";", "case", "bernoulli",...
Contribution to denominator for GBM's leaf node prediction @param w weight @param y response @param z residual @param f predicted value (including offset) @return weighted contribution to denominator
[ "Contribution", "to", "denominator", "for", "GBM", "s", "leaf", "node", "prediction" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Distribution.java#L291-L315
131,116
h2oai/h2o-3
h2o-jetty-8/src/main/java/water/webserver/jetty8/Jetty8ServerAdapter.java
Jetty8ServerAdapter.stop
@Override public void stop() throws IOException { if (jettyServer != null) { try { jettyServer.stop(); } catch (IOException e) { throw e; } catch (Exception e) { throw new IOException(e); } } }
java
@Override public void stop() throws IOException { if (jettyServer != null) { try { jettyServer.stop(); } catch (IOException e) { throw e; } catch (Exception e) { throw new IOException(e); } } }
[ "@", "Override", "public", "void", "stop", "(", ")", "throws", "IOException", "{", "if", "(", "jettyServer", "!=", "null", ")", "{", "try", "{", "jettyServer", ".", "stop", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "e",...
Stop Jetty server after it has been started. This is unlikely to ever be called by H2O until H2O supports graceful shutdown. @throws Exception -
[ "Stop", "Jetty", "server", "after", "it", "has", "been", "started", ".", "This", "is", "unlikely", "to", "ever", "be", "called", "by", "H2O", "until", "H2O", "supports", "graceful", "shutdown", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-jetty-8/src/main/java/water/webserver/jetty8/Jetty8ServerAdapter.java#L60-L71
131,117
h2oai/h2o-3
h2o-core/src/main/java/water/parser/ParseUUID.java
ParseUUID.isUUID
public static boolean isUUID(BufferedString str) { boolean res; int old = str.getOffset(); attemptUUIDParseLow(str); attemptUUIDParseHigh(str); res = str.getOffset() != -1; str.setOff(old); return res; }
java
public static boolean isUUID(BufferedString str) { boolean res; int old = str.getOffset(); attemptUUIDParseLow(str); attemptUUIDParseHigh(str); res = str.getOffset() != -1; str.setOff(old); return res; }
[ "public", "static", "boolean", "isUUID", "(", "BufferedString", "str", ")", "{", "boolean", "res", ";", "int", "old", "=", "str", ".", "getOffset", "(", ")", ";", "attemptUUIDParseLow", "(", "str", ")", ";", "attemptUUIDParseHigh", "(", "str", ")", ";", ...
Confirms whether the provided UUID is considered valid. @param str @return TRUE if str represents a valid UUID
[ "Confirms", "whether", "the", "provided", "UUID", "is", "considered", "valid", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/ParseUUID.java#L22-L30
131,118
h2oai/h2o-3
h2o-algos/src/main/java/hex/tree/TreeJCodeGen.java
TreeJCodeGen.closure
protected void closure(SB sb) throws RuntimeException { sb.p(";").nl(); sb.ip("return pred;").nl().di(1); sb.ip("}").p(" // constant pool size = ").p(_constantPoolSize).p("B, number of visited nodes = ").p(_nodes).p(", static init size = ").p(_staticInitSize).p("B"); sb.nl(); // close the method // ...
java
protected void closure(SB sb) throws RuntimeException { sb.p(";").nl(); sb.ip("return pred;").nl().di(1); sb.ip("}").p(" // constant pool size = ").p(_constantPoolSize).p("B, number of visited nodes = ").p(_nodes).p(", static init size = ").p(_staticInitSize).p("B"); sb.nl(); // close the method // ...
[ "protected", "void", "closure", "(", "SB", "sb", ")", "throws", "RuntimeException", "{", "sb", ".", "p", "(", "\";\"", ")", ".", "nl", "(", ")", ";", "sb", ".", "ip", "(", "\"return pred;\"", ")", ".", "nl", "(", ")", ".", "di", "(", "1", ")", ...
close the code
[ "close", "the", "code" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/tree/TreeJCodeGen.java#L60-L68
131,119
h2oai/h2o-3
h2o-core/src/main/java/water/FJPacket.java
FJPacket.onExceptionalCompletion
@Override public boolean onExceptionalCompletion(Throwable ex, jsr166y.CountedCompleter caller) { System.err.println("onExCompletion for "+this); ex.printStackTrace(); water.util.Log.err(ex); return true; }
java
@Override public boolean onExceptionalCompletion(Throwable ex, jsr166y.CountedCompleter caller) { System.err.println("onExCompletion for "+this); ex.printStackTrace(); water.util.Log.err(ex); return true; }
[ "@", "Override", "public", "boolean", "onExceptionalCompletion", "(", "Throwable", "ex", ",", "jsr166y", ".", "CountedCompleter", "caller", ")", "{", "System", ".", "err", ".", "println", "(", "\"onExCompletion for \"", "+", "this", ")", ";", "ex", ".", "print...
Exceptional completion path; mostly does printing if the exception was not handled earlier in the stack.
[ "Exceptional", "completion", "path", ";", "mostly", "does", "printing", "if", "the", "exception", "was", "not", "handled", "earlier", "in", "the", "stack", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/FJPacket.java#L37-L42
131,120
h2oai/h2o-3
h2o-core/src/main/java/water/fvec/RollupStats.java
RollupStats.getOrNull
static RollupStats getOrNull(Vec vec, final Key rskey ) { Value val = DKV.get(rskey); if( val == null ) // No rollup stats present? return vec.length() > 0 ? /*not computed*/null : /*empty vec*/new RollupStats(0); RollupStats rs = val.get(RollupStats.class); return rs.isReady() ? rs : nu...
java
static RollupStats getOrNull(Vec vec, final Key rskey ) { Value val = DKV.get(rskey); if( val == null ) // No rollup stats present? return vec.length() > 0 ? /*not computed*/null : /*empty vec*/new RollupStats(0); RollupStats rs = val.get(RollupStats.class); return rs.isReady() ? rs : nu...
[ "static", "RollupStats", "getOrNull", "(", "Vec", "vec", ",", "final", "Key", "rskey", ")", "{", "Value", "val", "=", "DKV", ".", "get", "(", "rskey", ")", ";", "if", "(", "val", "==", "null", ")", "// No rollup stats present?", "return", "vec", ".", "...
Fetch if present, but do not compute
[ "Fetch", "if", "present", "but", "do", "not", "compute" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/fvec/RollupStats.java#L355-L361
131,121
h2oai/h2o-3
h2o-automl/src/main/java/ai/h2o/automl/UserFeedback.java
UserFeedback.debug
public void debug(UserFeedbackEvent.Stage stage, String message) { Log.debug(stage+": "+message); addEvent(new UserFeedbackEvent(autoML, UserFeedbackEvent.Level.Debug, stage, message)); }
java
public void debug(UserFeedbackEvent.Stage stage, String message) { Log.debug(stage+": "+message); addEvent(new UserFeedbackEvent(autoML, UserFeedbackEvent.Level.Debug, stage, message)); }
[ "public", "void", "debug", "(", "UserFeedbackEvent", ".", "Stage", "stage", ",", "String", "message", ")", "{", "Log", ".", "debug", "(", "stage", "+", "\": \"", "+", "message", ")", ";", "addEvent", "(", "new", "UserFeedbackEvent", "(", "autoML", ",", "...
Add a Debug UserFeedbackEvent and log.
[ "Add", "a", "Debug", "UserFeedbackEvent", "and", "log", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-automl/src/main/java/ai/h2o/automl/UserFeedback.java#L33-L36
131,122
h2oai/h2o-3
h2o-automl/src/main/java/ai/h2o/automl/UserFeedback.java
UserFeedback.info
public void info(UserFeedbackEvent.Stage stage, String message) { Log.info(stage+": "+message); addEvent(new UserFeedbackEvent(autoML, UserFeedbackEvent.Level.Info, stage, message)); }
java
public void info(UserFeedbackEvent.Stage stage, String message) { Log.info(stage+": "+message); addEvent(new UserFeedbackEvent(autoML, UserFeedbackEvent.Level.Info, stage, message)); }
[ "public", "void", "info", "(", "UserFeedbackEvent", ".", "Stage", "stage", ",", "String", "message", ")", "{", "Log", ".", "info", "(", "stage", "+", "\": \"", "+", "message", ")", ";", "addEvent", "(", "new", "UserFeedbackEvent", "(", "autoML", ",", "Us...
Add a Info UserFeedbackEvent and log.
[ "Add", "a", "Info", "UserFeedbackEvent", "and", "log", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-automl/src/main/java/ai/h2o/automl/UserFeedback.java#L39-L42
131,123
h2oai/h2o-3
h2o-automl/src/main/java/ai/h2o/automl/UserFeedback.java
UserFeedback.warn
public void warn(UserFeedbackEvent.Stage stage, String message) { Log.warn(stage+": "+message); addEvent(new UserFeedbackEvent(autoML, UserFeedbackEvent.Level.Warn, stage, message)); }
java
public void warn(UserFeedbackEvent.Stage stage, String message) { Log.warn(stage+": "+message); addEvent(new UserFeedbackEvent(autoML, UserFeedbackEvent.Level.Warn, stage, message)); }
[ "public", "void", "warn", "(", "UserFeedbackEvent", ".", "Stage", "stage", ",", "String", "message", ")", "{", "Log", ".", "warn", "(", "stage", "+", "\": \"", "+", "message", ")", ";", "addEvent", "(", "new", "UserFeedbackEvent", "(", "autoML", ",", "Us...
Add a Warn UserFeedbackEvent and log.
[ "Add", "a", "Warn", "UserFeedbackEvent", "and", "log", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-automl/src/main/java/ai/h2o/automl/UserFeedback.java#L45-L48
131,124
h2oai/h2o-3
h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java
OrcParser.parseChunk
@Override protected final ParseWriter parseChunk(int chunkId, ParseReader din, ParseWriter dout) { _cidx = chunkId; // only do something if within file size and the orc file is not empty List<StripeInformation> stripesInfo = ((OrcParseSetup) this._setup).getStripes(); if(stripesInfo.size() == 0) { ...
java
@Override protected final ParseWriter parseChunk(int chunkId, ParseReader din, ParseWriter dout) { _cidx = chunkId; // only do something if within file size and the orc file is not empty List<StripeInformation> stripesInfo = ((OrcParseSetup) this._setup).getStripes(); if(stripesInfo.size() == 0) { ...
[ "@", "Override", "protected", "final", "ParseWriter", "parseChunk", "(", "int", "chunkId", ",", "ParseReader", "din", ",", "ParseWriter", "dout", ")", "{", "_cidx", "=", "chunkId", ";", "// only do something if within file size and the orc file is not empty", "List", "<...
This method calculates the number of stripes that will be read for each chunk. Since only single threading is supported in reading each stripe, we will never split one stripe over different chunks. @param chunkId: chunk index, calculated as file size/chunk size. The file size is calculated with data plus overhead in...
[ "This", "method", "calculates", "the", "number", "of", "stripes", "that", "will", "be", "read", "for", "each", "chunk", ".", "Since", "only", "single", "threading", "is", "supported", "in", "reading", "each", "stripe", "we", "will", "never", "split", "one", ...
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java#L105-L153
131,125
h2oai/h2o-3
h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java
OrcParser.write1column
private void write1column(ColumnVector oneColumn, String columnType, int cIdx, int rowNumber,ParseWriter dout) { if(oneColumn.isRepeating && !oneColumn.noNulls) { // ALL NAs for(int i = 0; i < rowNumber; ++i) dout.addInvalidCol(cIdx); } else switch (columnType.toLowerCase()) { case "bigint"...
java
private void write1column(ColumnVector oneColumn, String columnType, int cIdx, int rowNumber,ParseWriter dout) { if(oneColumn.isRepeating && !oneColumn.noNulls) { // ALL NAs for(int i = 0; i < rowNumber; ++i) dout.addInvalidCol(cIdx); } else switch (columnType.toLowerCase()) { case "bigint"...
[ "private", "void", "write1column", "(", "ColumnVector", "oneColumn", ",", "String", "columnType", ",", "int", "cIdx", ",", "int", "rowNumber", ",", "ParseWriter", "dout", ")", "{", "if", "(", "oneColumn", ".", "isRepeating", "&&", "!", "oneColumn", ".", "noN...
This method writes one column of H2O data frame at a time. @param oneColumn @param columnType @param cIdx @param rowNumber @param dout
[ "This", "method", "writes", "one", "column", "of", "H2O", "data", "frame", "at", "a", "time", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java#L165-L204
131,126
h2oai/h2o-3
h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java
OrcParser.writeTimecolumn
private void writeTimecolumn(LongColumnVector col, String columnType,int cIdx, int rowNumber, ParseWriter dout) { boolean timestamp = columnType.equals("timestamp"); long [] oneColumn = col.vector; if(col.isRepeating) { long val = timestamp ? oneColumn[0] / 1000000 : cor...
java
private void writeTimecolumn(LongColumnVector col, String columnType,int cIdx, int rowNumber, ParseWriter dout) { boolean timestamp = columnType.equals("timestamp"); long [] oneColumn = col.vector; if(col.isRepeating) { long val = timestamp ? oneColumn[0] / 1000000 : cor...
[ "private", "void", "writeTimecolumn", "(", "LongColumnVector", "col", ",", "String", "columnType", ",", "int", "cIdx", ",", "int", "rowNumber", ",", "ParseWriter", "dout", ")", "{", "boolean", "timestamp", "=", "columnType", ".", "equals", "(", "\"timestamp\"", ...
This method writes one column of H2O frame for column type timestamp. This is just a long that records the number of seconds since Jan 1, 2015. @param col @param cIdx @param rowNumber @param dout
[ "This", "method", "writes", "one", "column", "of", "H2O", "frame", "for", "column", "type", "timestamp", ".", "This", "is", "just", "a", "long", "that", "records", "the", "number", "of", "seconds", "since", "Jan", "1", "2015", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java#L236-L256
131,127
h2oai/h2o-3
h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java
OrcParser.writeDecimalcolumn
private void writeDecimalcolumn(DecimalColumnVector col, int cIdx, int rowNumber, ParseWriter dout) { HiveDecimalWritable[] oneColumn = col.vector; if(col.isRepeating) { HiveDecimal hd = oneColumn[0].getHiveDecimal(); for (int rowIndex = 0; rowIndex < rowNumber; row...
java
private void writeDecimalcolumn(DecimalColumnVector col, int cIdx, int rowNumber, ParseWriter dout) { HiveDecimalWritable[] oneColumn = col.vector; if(col.isRepeating) { HiveDecimal hd = oneColumn[0].getHiveDecimal(); for (int rowIndex = 0; rowIndex < rowNumber; row...
[ "private", "void", "writeDecimalcolumn", "(", "DecimalColumnVector", "col", ",", "int", "cIdx", ",", "int", "rowNumber", ",", "ParseWriter", "dout", ")", "{", "HiveDecimalWritable", "[", "]", "oneColumn", "=", "col", ".", "vector", ";", "if", "(", "col", "."...
This method writes a column to H2O frame for column type Decimal. It is just written as some integer without using the scale field. Need to make sure this is what the customer wants. @param col @param cIdx @param rowNumber @param dout
[ "This", "method", "writes", "a", "column", "to", "H2O", "frame", "for", "column", "type", "Decimal", ".", "It", "is", "just", "written", "as", "some", "integer", "without", "using", "the", "scale", "field", ".", "Need", "to", "make", "sure", "this", "is"...
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java#L267-L290
131,128
h2oai/h2o-3
h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java
OrcParser.writeStringcolumn
private void writeStringcolumn(BytesColumnVector col, int cIdx, int rowNumber, ParseWriter dout) { BufferedString bs = new BufferedString(); if(col.isRepeating) { assert col.length[0] >= 0 : getClass().getSimpleName() + ".writeStringcolumn/1: col.length[0]=" + col.length[0] + ", col.start[0]=" + col.start...
java
private void writeStringcolumn(BytesColumnVector col, int cIdx, int rowNumber, ParseWriter dout) { BufferedString bs = new BufferedString(); if(col.isRepeating) { assert col.length[0] >= 0 : getClass().getSimpleName() + ".writeStringcolumn/1: col.length[0]=" + col.length[0] + ", col.start[0]=" + col.start...
[ "private", "void", "writeStringcolumn", "(", "BytesColumnVector", "col", ",", "int", "cIdx", ",", "int", "rowNumber", ",", "ParseWriter", "dout", ")", "{", "BufferedString", "bs", "=", "new", "BufferedString", "(", ")", ";", "if", "(", "col", ".", "isRepeati...
This method writes a column of H2O frame for Orc File column types of string, varchar, char and binary at some point. @param col @param cIdx @param rowNumber @param dout
[ "This", "method", "writes", "a", "column", "of", "H2O", "frame", "for", "Orc", "File", "column", "types", "of", "string", "varchar", "char", "and", "binary", "at", "some", "point", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java#L301-L328
131,129
h2oai/h2o-3
h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java
OrcParser.writeDoublecolumn
private void writeDoublecolumn(DoubleColumnVector vec, int colId, int rowNumber, ParseWriter dout) { double[] oneColumn = vec.vector; byte t = _setup.getColumnTypes()[colId]; switch(t) { case Vec.T_CAT: if(_toStringMaps.get(colId) == null) _toStringMaps.put(colId,new HashMap<Number, ...
java
private void writeDoublecolumn(DoubleColumnVector vec, int colId, int rowNumber, ParseWriter dout) { double[] oneColumn = vec.vector; byte t = _setup.getColumnTypes()[colId]; switch(t) { case Vec.T_CAT: if(_toStringMaps.get(colId) == null) _toStringMaps.put(colId,new HashMap<Number, ...
[ "private", "void", "writeDoublecolumn", "(", "DoubleColumnVector", "vec", ",", "int", "colId", ",", "int", "rowNumber", ",", "ParseWriter", "dout", ")", "{", "double", "[", "]", "oneColumn", "=", "vec", ".", "vector", ";", "byte", "t", "=", "_setup", ".", ...
This method writes a column of H2O frame for Orc File column type of float or double. @param vec @param colId @param rowNumber @param dout
[ "This", "method", "writes", "a", "column", "of", "H2O", "frame", "for", "Orc", "File", "column", "type", "of", "float", "or", "double", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java#L339-L389
131,130
h2oai/h2o-3
h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java
OrcParser.check_Min_Value
private void check_Min_Value(long l, int cIdx, int rowNumber, ParseWriter dout) { if (l <= Long.MIN_VALUE) { String warning = "Orc Parser: Long.MIN_VALUE: " + l + " is found in column "+cIdx+" row "+rowNumber + " of stripe "+_cidx +". This value is used for sentinel and will not be parsed correctly...
java
private void check_Min_Value(long l, int cIdx, int rowNumber, ParseWriter dout) { if (l <= Long.MIN_VALUE) { String warning = "Orc Parser: Long.MIN_VALUE: " + l + " is found in column "+cIdx+" row "+rowNumber + " of stripe "+_cidx +". This value is used for sentinel and will not be parsed correctly...
[ "private", "void", "check_Min_Value", "(", "long", "l", ",", "int", "cIdx", ",", "int", "rowNumber", ",", "ParseWriter", "dout", ")", "{", "if", "(", "l", "<=", "Long", ".", "MIN_VALUE", ")", "{", "String", "warning", "=", "\"Orc Parser: Long.MIN_VALUE: \"",...
This method is written to check and make sure any value written to a column of type long is more than Long.MIN_VALUE. If this is not true, a warning will be passed to the user. @param l @param cIdx @param rowNumber @param dout
[ "This", "method", "is", "written", "to", "check", "and", "make", "sure", "any", "value", "written", "to", "a", "column", "of", "type", "long", "is", "more", "than", "Long", ".", "MIN_VALUE", ".", "If", "this", "is", "not", "true", "a", "warning", "will...
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java#L467-L473
131,131
h2oai/h2o-3
h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java
OrcParser.countStructFields
static private int countStructFields(ObjectInspector x, ArrayList<String> allColumnNames) { int res = 1; switch(x.getCategory()) { case STRUCT: StructObjectInspector structObjectInspector = (StructObjectInspector) x; List<StructField> allColumns = (List<StructField>) structObjectInspector....
java
static private int countStructFields(ObjectInspector x, ArrayList<String> allColumnNames) { int res = 1; switch(x.getCategory()) { case STRUCT: StructObjectInspector structObjectInspector = (StructObjectInspector) x; List<StructField> allColumns = (List<StructField>) structObjectInspector....
[ "static", "private", "int", "countStructFields", "(", "ObjectInspector", "x", ",", "ArrayList", "<", "String", ">", "allColumnNames", ")", "{", "int", "res", "=", "1", ";", "switch", "(", "x", ".", "getCategory", "(", ")", ")", "{", "case", "STRUCT", ":"...
which are ignored for now
[ "which", "are", "ignored", "for", "now" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-orc-parser/src/main/java/water/parser/orc/OrcParser.java#L543-L576
131,132
h2oai/h2o-3
h2o-core/src/main/java/water/util/FileIntegrityChecker.java
FileIntegrityChecker.syncDirectory
public Key syncDirectory(ArrayList<String> files, ArrayList<String> keys, ArrayList<String> fails, ArrayList<String> dels) { Futures fs = new Futures(); Key k = null; // Find all Keys which match ... for( int i = 0; i < _f...
java
public Key syncDirectory(ArrayList<String> files, ArrayList<String> keys, ArrayList<String> fails, ArrayList<String> dels) { Futures fs = new Futures(); Key k = null; // Find all Keys which match ... for( int i = 0; i < _f...
[ "public", "Key", "syncDirectory", "(", "ArrayList", "<", "String", ">", "files", ",", "ArrayList", "<", "String", ">", "keys", ",", "ArrayList", "<", "String", ">", "fails", ",", "ArrayList", "<", "String", ">", "dels", ")", "{", "Futures", "fs", "=", ...
which match the directory name but are not on disk.
[ "which", "match", "the", "directory", "name", "but", "are", "not", "on", "disk", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/util/FileIntegrityChecker.java#L64-L92
131,133
h2oai/h2o-3
h2o-algos/src/main/java/hex/tree/DTree.java
Node.printLine
StringBuilder printLine(StringBuilder sb ) { if( _pid== NO_PARENT) return sb.append("[root]"); DecidedNode parent = _tree.decided(_pid); parent.printLine(sb).append(" to "); return parent.printChild(sb,_nid); }
java
StringBuilder printLine(StringBuilder sb ) { if( _pid== NO_PARENT) return sb.append("[root]"); DecidedNode parent = _tree.decided(_pid); parent.printLine(sb).append(" to "); return parent.printChild(sb,_nid); }
[ "StringBuilder", "printLine", "(", "StringBuilder", "sb", ")", "{", "if", "(", "_pid", "==", "NO_PARENT", ")", "return", "sb", ".", "append", "(", "\"[root]\"", ")", ";", "DecidedNode", "parent", "=", "_tree", ".", "decided", "(", "_pid", ")", ";", "pare...
Recursively print the decision-line from tree root to this child.
[ "Recursively", "print", "the", "decision", "-", "line", "from", "tree", "root", "to", "this", "child", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/tree/DTree.java#L112-L117
131,134
h2oai/h2o-3
h2o-algos/src/main/java/hex/tree/DTree.java
UndecidedNode.scoreCols
public int[] scoreCols() { DTree tree = _tree; if (tree.actual_mtries() == _hs.length && tree._mtrys_per_tree == _hs.length) return null; // per-tree pre-selected columns int[] activeCols = tree._cols; // Log.info("For tree with seed " + tree._seed + ", out of " + _hs.length + " cols, the ...
java
public int[] scoreCols() { DTree tree = _tree; if (tree.actual_mtries() == _hs.length && tree._mtrys_per_tree == _hs.length) return null; // per-tree pre-selected columns int[] activeCols = tree._cols; // Log.info("For tree with seed " + tree._seed + ", out of " + _hs.length + " cols, the ...
[ "public", "int", "[", "]", "scoreCols", "(", ")", "{", "DTree", "tree", "=", "_tree", ";", "if", "(", "tree", ".", "actual_mtries", "(", ")", "==", "_hs", ".", "length", "&&", "tree", ".", "_mtrys_per_tree", "==", "_hs", ".", "length", ")", "return",...
Can return null for 'all columns'.
[ "Can", "return", "null", "for", "all", "columns", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/tree/DTree.java#L325-L361
131,135
h2oai/h2o-3
h2o-algos/src/main/java/hex/tree/DTree.java
UndecidedNode.do_not_split
public void do_not_split( ) { if( _pid == NO_PARENT) return; // skip root DecidedNode dn = _tree.decided(_pid); for( int i=0; i<dn._nids.length; i++ ) if( dn._nids[i]==_nid ) { dn._nids[i] = ScoreBuildHistogram.UNDECIDED_CHILD_NODE_ID; return; } throw H2O.fail(); }
java
public void do_not_split( ) { if( _pid == NO_PARENT) return; // skip root DecidedNode dn = _tree.decided(_pid); for( int i=0; i<dn._nids.length; i++ ) if( dn._nids[i]==_nid ) { dn._nids[i] = ScoreBuildHistogram.UNDECIDED_CHILD_NODE_ID; return; } throw H2O.fail(); }
[ "public", "void", "do_not_split", "(", ")", "{", "if", "(", "_pid", "==", "NO_PARENT", ")", "return", ";", "// skip root", "DecidedNode", "dn", "=", "_tree", ".", "decided", "(", "_pid", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "d...
perfect prediction here, and we want to turn into a leaf.
[ "perfect", "prediction", "here", "and", "we", "want", "to", "turn", "into", "a", "leaf", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/tree/DTree.java#L366-L373
131,136
h2oai/h2o-3
h2o-algos/src/main/java/hex/tree/DTree.java
UndecidedNode.size
@Override public final int size(){ if( _size != 0 ) return _size; // Cached size assert _nodeType == 0:"unexpected node type: " + _nodeType; if(_split._equal != 0) _nodeType |= _split._equal == 1 ? 4 : (_split._equal == 2 ? 8 : 12); // int res = 7; // 1B node type + flags, 2B colId, 4...
java
@Override public final int size(){ if( _size != 0 ) return _size; // Cached size assert _nodeType == 0:"unexpected node type: " + _nodeType; if(_split._equal != 0) _nodeType |= _split._equal == 1 ? 4 : (_split._equal == 2 ? 8 : 12); // int res = 7; // 1B node type + flags, 2B colId, 4...
[ "@", "Override", "public", "final", "int", "size", "(", ")", "{", "if", "(", "_size", "!=", "0", ")", "return", "_size", ";", "// Cached size", "assert", "_nodeType", "==", "0", ":", "\"unexpected node type: \"", "+", "_nodeType", ";", "if", "(", "_split",...
Size of this subtree; sets _nodeType also
[ "Size", "of", "this", "subtree", ";", "sets", "_nodeType", "also" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/tree/DTree.java#L666-L698
131,137
h2oai/h2o-3
h2o-algos/src/main/java/hex/tree/DTree.java
UndecidedNode.compress
@Override public AutoBuffer compress(AutoBuffer ab, AutoBuffer abAux) { int pos = ab.position(); if( _nodeType == 0 ) size(); // Sets _nodeType & _size both ab.put1(_nodeType); // Includes left-child skip-size bits assert _split != null; // Not a broken root non-decision? asser...
java
@Override public AutoBuffer compress(AutoBuffer ab, AutoBuffer abAux) { int pos = ab.position(); if( _nodeType == 0 ) size(); // Sets _nodeType & _size both ab.put1(_nodeType); // Includes left-child skip-size bits assert _split != null; // Not a broken root non-decision? asser...
[ "@", "Override", "public", "AutoBuffer", "compress", "(", "AutoBuffer", "ab", ",", "AutoBuffer", "abAux", ")", "{", "int", "pos", "=", "ab", ".", "position", "(", ")", ";", "if", "(", "_nodeType", "==", "0", ")", "size", "(", ")", ";", "// Sets _nodeTy...
Compress this tree into the AutoBuffer
[ "Compress", "this", "tree", "into", "the", "AutoBuffer" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/tree/DTree.java#L709-L751
131,138
h2oai/h2o-3
h2o-core/src/main/java/water/parser/FVecParseWriter.java
FVecParseWriter.addNumCol
@Override public void addNumCol(int colIdx, double value) { if (Double.isNaN(value) || Double.isInfinite(value)) { addInvalidCol(colIdx); } else { if( colIdx < _nCols ) { _nvs[_col = colIdx].addNumDecompose(value); if(_ctypes != null && _ctypes[colIdx] == Vec.T_BAD ) _ctypes[colIdx] ...
java
@Override public void addNumCol(int colIdx, double value) { if (Double.isNaN(value) || Double.isInfinite(value)) { addInvalidCol(colIdx); } else { if( colIdx < _nCols ) { _nvs[_col = colIdx].addNumDecompose(value); if(_ctypes != null && _ctypes[colIdx] == Vec.T_BAD ) _ctypes[colIdx] ...
[ "@", "Override", "public", "void", "addNumCol", "(", "int", "colIdx", ",", "double", "value", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "value", ")", "||", "Double", ".", "isInfinite", "(", "value", ")", ")", "{", "addInvalidCol", "(", "colIdx"...
Adds double value to the column.
[ "Adds", "double", "value", "to", "the", "column", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/FVecParseWriter.java#L191-L200
131,139
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/algos/deepwater/caffe/DeepwaterCaffeModel.java
DeepwaterCaffeModel.startRegular
private void startRegular() throws IOException { String pwd = DeepwaterCaffeBackend.CAFFE_H2O_DIR; ProcessBuilder pb = new ProcessBuilder("python3 backend.py".split(" ")); pb.environment().put("PYTHONPATH", DeepwaterCaffeBackend.CAFFE_DIR + "python"); pb.redirectError(ProcessBuilder.Redirect.INHERIT); ...
java
private void startRegular() throws IOException { String pwd = DeepwaterCaffeBackend.CAFFE_H2O_DIR; ProcessBuilder pb = new ProcessBuilder("python3 backend.py".split(" ")); pb.environment().put("PYTHONPATH", DeepwaterCaffeBackend.CAFFE_DIR + "python"); pb.redirectError(ProcessBuilder.Redirect.INHERIT); ...
[ "private", "void", "startRegular", "(", ")", "throws", "IOException", "{", "String", "pwd", "=", "DeepwaterCaffeBackend", ".", "CAFFE_H2O_DIR", ";", "ProcessBuilder", "pb", "=", "new", "ProcessBuilder", "(", "\"python3 backend.py\"", ".", "split", "(", "\" \"", ")...
Debug, or if wee find a way to package Caffe without Docker
[ "Debug", "or", "if", "wee", "find", "a", "way", "to", "package", "Caffe", "without", "Docker" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/algos/deepwater/caffe/DeepwaterCaffeModel.java#L157-L164
131,140
h2oai/h2o-3
h2o-core/src/main/java/water/fvec/NFSFileVec.java
NFSFileVec.make
public static NFSFileVec make(File f) { Futures fs = new Futures(); NFSFileVec nfs = make(f, fs); fs.blockForPending(); return nfs; }
java
public static NFSFileVec make(File f) { Futures fs = new Futures(); NFSFileVec nfs = make(f, fs); fs.blockForPending(); return nfs; }
[ "public", "static", "NFSFileVec", "make", "(", "File", "f", ")", "{", "Futures", "fs", "=", "new", "Futures", "(", ")", ";", "NFSFileVec", "nfs", "=", "make", "(", "f", ",", "fs", ")", ";", "fs", ".", "blockForPending", "(", ")", ";", "return", "nf...
Make a new NFSFileVec key which holds the filename implicitly. This name is used by the Chunks to load data on-demand. Blocking @return A NFSFileVec mapped to this file.
[ "Make", "a", "new", "NFSFileVec", "key", "which", "holds", "the", "filename", "implicitly", ".", "This", "name", "is", "used", "by", "the", "Chunks", "to", "load", "data", "on", "-", "demand", ".", "Blocking" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/fvec/NFSFileVec.java#L27-L32
131,141
h2oai/h2o-3
h2o-core/src/main/java/water/fvec/NFSFileVec.java
NFSFileVec.make
public static NFSFileVec make(File f, Futures fs) { if( !f.exists() ) throw new IllegalArgumentException("File not found: "+f.toString()); long size = f.length(); Key k = Vec.newKey(PersistNFS.decodeFile(f)); // Insert the top-level FileVec key into the store NFSFileVec nfs = new NFSFileVec(k,size);...
java
public static NFSFileVec make(File f, Futures fs) { if( !f.exists() ) throw new IllegalArgumentException("File not found: "+f.toString()); long size = f.length(); Key k = Vec.newKey(PersistNFS.decodeFile(f)); // Insert the top-level FileVec key into the store NFSFileVec nfs = new NFSFileVec(k,size);...
[ "public", "static", "NFSFileVec", "make", "(", "File", "f", ",", "Futures", "fs", ")", "{", "if", "(", "!", "f", ".", "exists", "(", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"File not found: \"", "+", "f", ".", "toString", "(", ")", ...
Make a new NFSFileVec key which holds the filename implicitly. This name is used by the Chunks to load data on-demand. @return A NFSFileVec mapped to this file.
[ "Make", "a", "new", "NFSFileVec", "key", "which", "holds", "the", "filename", "implicitly", ".", "This", "name", "is", "used", "by", "the", "Chunks", "to", "load", "data", "on", "-", "demand", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/fvec/NFSFileVec.java#L42-L50
131,142
h2oai/h2o-3
h2o-genmodel/src/main/java/water/util/ModelUtils.java
ModelUtils.sampleOOBRows
public static int[] sampleOOBRows(int nrows, float rate, Random sampler) { return sampleOOBRows(nrows, rate, sampler, new int[2+Math.round((1f-rate)*nrows*1.2f+0.5f)]); }
java
public static int[] sampleOOBRows(int nrows, float rate, Random sampler) { return sampleOOBRows(nrows, rate, sampler, new int[2+Math.round((1f-rate)*nrows*1.2f+0.5f)]); }
[ "public", "static", "int", "[", "]", "sampleOOBRows", "(", "int", "nrows", ",", "float", "rate", ",", "Random", "sampler", ")", "{", "return", "sampleOOBRows", "(", "nrows", ",", "rate", ",", "sampler", ",", "new", "int", "[", "2", "+", "Math", ".", ...
Sample out-of-bag rows with given rate with help of given sampler. It returns array of sampled rows. The first element of array contains a number of sampled rows. The returned array can be larger than number of returned sampled elements. @param nrows number of rows to sample from. @param rate sampling rate @param samp...
[ "Sample", "out", "-", "of", "-", "bag", "rows", "with", "given", "rate", "with", "help", "of", "given", "sampler", ".", "It", "returns", "array", "of", "sampled", "rows", ".", "The", "first", "element", "of", "array", "contains", "a", "number", "of", "...
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/water/util/ModelUtils.java#L30-L32
131,143
h2oai/h2o-3
h2o-core/src/main/java/water/TimeLine.java
TimeLine.next_idx
private static int next_idx( long [] tl ) { // Spin until we can CAS-acquire a fresh index while( true ) { int oldidx = (int)tl[0]; int newidx = (oldidx+1)&(MAX_EVENTS-1); if( CAS( tl, 0, oldidx, newidx ) ) return oldidx; } }
java
private static int next_idx( long [] tl ) { // Spin until we can CAS-acquire a fresh index while( true ) { int oldidx = (int)tl[0]; int newidx = (oldidx+1)&(MAX_EVENTS-1); if( CAS( tl, 0, oldidx, newidx ) ) return oldidx; } }
[ "private", "static", "int", "next_idx", "(", "long", "[", "]", "tl", ")", "{", "// Spin until we can CAS-acquire a fresh index", "while", "(", "true", ")", "{", "int", "oldidx", "=", "(", "int", ")", "tl", "[", "0", "]", ";", "int", "newidx", "=", "(", ...
Return the next index into the TIMELINE array
[ "Return", "the", "next", "index", "into", "the", "TIMELINE", "array" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/TimeLine.java#L60-L68
131,144
h2oai/h2o-3
h2o-core/src/main/java/water/TimeLine.java
TimeLine.tcp_call
static void tcp_call( final AutoBuffer ab ) { ab.getPort(); long[] snap = ab.getA8(); int idx = CLOUD.nidx(ab._h2o); if (idx >= 0 && idx < SNAPSHOT.length) SNAPSHOT[idx] = snap; // Ignore out-of-cloud timelines ab.close(); synchronized (TimeLine.class) { TimeLine.class.notify(); ...
java
static void tcp_call( final AutoBuffer ab ) { ab.getPort(); long[] snap = ab.getA8(); int idx = CLOUD.nidx(ab._h2o); if (idx >= 0 && idx < SNAPSHOT.length) SNAPSHOT[idx] = snap; // Ignore out-of-cloud timelines ab.close(); synchronized (TimeLine.class) { TimeLine.class.notify(); ...
[ "static", "void", "tcp_call", "(", "final", "AutoBuffer", "ab", ")", "{", "ab", ".", "getPort", "(", ")", ";", "long", "[", "]", "snap", "=", "ab", ".", "getA8", "(", ")", ";", "int", "idx", "=", "CLOUD", ".", "nidx", "(", "ab", ".", "_h2o", ")...
Receive a remote timeline
[ "Receive", "a", "remote", "timeline" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/TimeLine.java#L238-L248
131,145
h2oai/h2o-3
h2o-core/src/main/java/water/TimeLine.java
TimeLine.printMyTimeLine
static void printMyTimeLine(){ long [] s = TimeLine.snapshot(); System.err.println("===================================<TIMELINE>=============================================="); for(int i = 0; i < TimeLine.length(); ++i) { long lo = TimeLine.l0(s, i),hi = TimeLine.l8(s, i); int port = (int)((lo...
java
static void printMyTimeLine(){ long [] s = TimeLine.snapshot(); System.err.println("===================================<TIMELINE>=============================================="); for(int i = 0; i < TimeLine.length(); ++i) { long lo = TimeLine.l0(s, i),hi = TimeLine.l8(s, i); int port = (int)((lo...
[ "static", "void", "printMyTimeLine", "(", ")", "{", "long", "[", "]", "s", "=", "TimeLine", ".", "snapshot", "(", ")", ";", "System", ".", "err", ".", "println", "(", "\"===================================<TIMELINE>==============================================\"", ")...
Only for debugging. Prints local timeline to stdout. To be used in case of an error when global timeline can not be relied upon as we might not be able to talk to other nodes.
[ "Only", "for", "debugging", ".", "Prints", "local", "timeline", "to", "stdout", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/TimeLine.java#L258-L269
131,146
h2oai/h2o-3
h2o-algos/src/main/java/hex/word2vec/Word2VecModel.java
Word2VecModel.toFrame
public Frame toFrame() { Vec zeroVec = null; try { zeroVec = Vec.makeZero(_output._words.length); byte[] types = new byte[1 + _output._vecSize]; Arrays.fill(types, Vec.T_NUM); types[0] = Vec.T_STR; String[] colNames = new String[types.length]; colNames[0] = "Word"; for ...
java
public Frame toFrame() { Vec zeroVec = null; try { zeroVec = Vec.makeZero(_output._words.length); byte[] types = new byte[1 + _output._vecSize]; Arrays.fill(types, Vec.T_NUM); types[0] = Vec.T_STR; String[] colNames = new String[types.length]; colNames[0] = "Word"; for ...
[ "public", "Frame", "toFrame", "(", ")", "{", "Vec", "zeroVec", "=", "null", ";", "try", "{", "zeroVec", "=", "Vec", ".", "makeZero", "(", "_output", ".", "_words", ".", "length", ")", ";", "byte", "[", "]", "types", "=", "new", "byte", "[", "1", ...
Converts this word2vec model to a Frame. @return Frame made of columns: Word, V1, .., Vn. Word column holds the vocabulary associated with this word2vec model, and columns V1, .., Vn represent the embeddings in the n-dimensional space.
[ "Converts", "this", "word2vec", "model", "to", "a", "Frame", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/word2vec/Word2VecModel.java#L48-L63
131,147
h2oai/h2o-3
h2o-algos/src/main/java/hex/word2vec/Word2VecModel.java
Word2VecModel.cosineSimilarity
private float cosineSimilarity(float[] target, int pos, float[] vecs) { float dotProd = 0, tsqr = 0, csqr = 0; for(int i = 0; i < target.length; i++) { dotProd += target[i] * vecs[pos + i]; tsqr += Math.pow(target[i], 2); csqr += Math.pow(vecs[pos + i], 2); } return (float) (dotProd / ...
java
private float cosineSimilarity(float[] target, int pos, float[] vecs) { float dotProd = 0, tsqr = 0, csqr = 0; for(int i = 0; i < target.length; i++) { dotProd += target[i] * vecs[pos + i]; tsqr += Math.pow(target[i], 2); csqr += Math.pow(vecs[pos + i], 2); } return (float) (dotProd / ...
[ "private", "float", "cosineSimilarity", "(", "float", "[", "]", "target", ",", "int", "pos", ",", "float", "[", "]", "vecs", ")", "{", "float", "dotProd", "=", "0", ",", "tsqr", "=", "0", ",", "csqr", "=", "0", ";", "for", "(", "int", "i", "=", ...
Basic calculation of cosine similarity @param target - a word vector @param pos - position in vecs @param vecs - learned word vectors @return cosine similarity between the two word vectors
[ "Basic", "calculation", "of", "cosine", "similarity" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/word2vec/Word2VecModel.java#L252-L260
131,148
h2oai/h2o-3
h2o-core/src/main/java/water/parser/ZipUtil.java
ZipUtil.isZipDirectory
static boolean isZipDirectory(Key key) { Iced ice = DKV.getGet(key); if (ice == null) throw new H2OIllegalArgumentException("Missing data", "Did not find any data under " + "key " + key); ByteVec bv = (ByteVec) (ice instanceof ByteVec ? ice : ((Frame) ice).vecs()[0]); return isZipDirectory(...
java
static boolean isZipDirectory(Key key) { Iced ice = DKV.getGet(key); if (ice == null) throw new H2OIllegalArgumentException("Missing data", "Did not find any data under " + "key " + key); ByteVec bv = (ByteVec) (ice instanceof ByteVec ? ice : ((Frame) ice).vecs()[0]); return isZipDirectory(...
[ "static", "boolean", "isZipDirectory", "(", "Key", "key", ")", "{", "Iced", "ice", "=", "DKV", ".", "getGet", "(", "key", ")", ";", "if", "(", "ice", "==", "null", ")", "throw", "new", "H2OIllegalArgumentException", "(", "\"Missing data\"", ",", "\"Did not...
This method check if the input argument is a zip directory containing files. @param key @return true if bv is a zip directory containing files, false otherwise.
[ "This", "method", "check", "if", "the", "input", "argument", "is", "a", "zip", "directory", "containing", "files", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/ZipUtil.java#L61-L68
131,149
h2oai/h2o-3
h2o-core/src/main/java/water/parser/ZipUtil.java
ZipUtil.getDecompressionRatio
static float getDecompressionRatio(ByteVec bv) { long totalSize = 0L; long totalCompSize = 0L; if (bv instanceof FileVec) { String strPath = getPathForKey(((FileVec) bv)._key); try { ZipFile zipFile = new ZipFile(strPath); Enumeration<? extends ZipEntry> entries = zipFile.entr...
java
static float getDecompressionRatio(ByteVec bv) { long totalSize = 0L; long totalCompSize = 0L; if (bv instanceof FileVec) { String strPath = getPathForKey(((FileVec) bv)._key); try { ZipFile zipFile = new ZipFile(strPath); Enumeration<? extends ZipEntry> entries = zipFile.entr...
[ "static", "float", "getDecompressionRatio", "(", "ByteVec", "bv", ")", "{", "long", "totalSize", "=", "0L", ";", "long", "totalCompSize", "=", "0L", ";", "if", "(", "bv", "instanceof", "FileVec", ")", "{", "String", "strPath", "=", "getPathForKey", "(", "(...
When a file is a zip file that contains multiple files, this method will return the decompression ratio. @param bv @return
[ "When", "a", "file", "is", "a", "zip", "file", "that", "contains", "multiple", "files", "this", "method", "will", "return", "the", "decompression", "ratio", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/ZipUtil.java#L122-L151
131,150
h2oai/h2o-3
h2o-core/src/main/java/water/parser/ZipUtil.java
ZipUtil.unzipForHeader
static byte[] unzipForHeader( byte[] bs, int chkSize ) { ByteArrayInputStream bais = new ByteArrayInputStream(bs); ZipInputStream zis = new ZipInputStream(bais); InputStream is = zis; // Now read from the compressed stream int off = 0; try { while( off < bs.length ) { int len =...
java
static byte[] unzipForHeader( byte[] bs, int chkSize ) { ByteArrayInputStream bais = new ByteArrayInputStream(bs); ZipInputStream zis = new ZipInputStream(bais); InputStream is = zis; // Now read from the compressed stream int off = 0; try { while( off < bs.length ) { int len =...
[ "static", "byte", "[", "]", "unzipForHeader", "(", "byte", "[", "]", "bs", ",", "int", "chkSize", ")", "{", "ByteArrayInputStream", "bais", "=", "new", "ByteArrayInputStream", "(", "bs", ")", ";", "ZipInputStream", "zis", "=", "new", "ZipInputStream", "(", ...
This method will read a compressed zip file and return the uncompressed bits so that we can check the beginning of the file and make sure it does not contain the column names. @param bs @param chkSize @return
[ "This", "method", "will", "read", "a", "compressed", "zip", "file", "and", "return", "the", "uncompressed", "bits", "so", "that", "we", "can", "check", "the", "beginning", "of", "the", "file", "and", "make", "sure", "it", "does", "not", "contain", "the", ...
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/ZipUtil.java#L247-L281
131,151
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/algos/tree/SharedTreeGraph.java
SharedTreeGraph.makeSubgraph
public SharedTreeSubgraph makeSubgraph(String name) { SharedTreeSubgraph sg = new SharedTreeSubgraph(subgraphArray.size(), name); subgraphArray.add(sg); return sg; }
java
public SharedTreeSubgraph makeSubgraph(String name) { SharedTreeSubgraph sg = new SharedTreeSubgraph(subgraphArray.size(), name); subgraphArray.add(sg); return sg; }
[ "public", "SharedTreeSubgraph", "makeSubgraph", "(", "String", "name", ")", "{", "SharedTreeSubgraph", "sg", "=", "new", "SharedTreeSubgraph", "(", "subgraphArray", ".", "size", "(", ")", ",", "name", ")", ";", "subgraphArray", ".", "add", "(", "sg", ")", ";...
Make a new tree. @param name Tree name. @return The new tree.
[ "Make", "a", "new", "tree", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/algos/tree/SharedTreeGraph.java#L28-L32
131,152
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/algos/tree/SharedTreeGraph.java
SharedTreeGraph.print
public void print() { System.out.println("------------------------------------------------------------"); System.out.println("Graph"); for (SharedTreeSubgraph sg : subgraphArray) { sg.print(); } }
java
public void print() { System.out.println("------------------------------------------------------------"); System.out.println("Graph"); for (SharedTreeSubgraph sg : subgraphArray) { sg.print(); } }
[ "public", "void", "print", "(", ")", "{", "System", ".", "out", ".", "println", "(", "\"------------------------------------------------------------\"", ")", ";", "System", ".", "out", ".", "println", "(", "\"Graph\"", ")", ";", "for", "(", "SharedTreeSubgraph", ...
Debug printout of graph structure. For developer use only.
[ "Debug", "printout", "of", "graph", "structure", ".", "For", "developer", "use", "only", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/algos/tree/SharedTreeGraph.java#L38-L44
131,153
h2oai/h2o-3
h2o-algos/src/main/java/hex/tree/ScoreBuildHistogram.java
ScoreBuildHistogram.setupLocal
@Override public void setupLocal( ) { // Init all the internal tree fields after shipping over the wire _tree.init_tree(); // Allocate local shared memory histograms for( int l=_leaf; l<_tree._len; l++ ) { DTree.UndecidedNode udn = _tree.undecided(l); DHistogram hs[] = _hcs[l-_leaf]; i...
java
@Override public void setupLocal( ) { // Init all the internal tree fields after shipping over the wire _tree.init_tree(); // Allocate local shared memory histograms for( int l=_leaf; l<_tree._len; l++ ) { DTree.UndecidedNode udn = _tree.undecided(l); DHistogram hs[] = _hcs[l-_leaf]; i...
[ "@", "Override", "public", "void", "setupLocal", "(", ")", "{", "// Init all the internal tree fields after shipping over the wire", "_tree", ".", "init_tree", "(", ")", ";", "// Allocate local shared memory histograms", "for", "(", "int", "l", "=", "_leaf", ";", "l", ...
Once-per-node shared init
[ "Once", "-", "per", "-", "node", "shared", "init" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/tree/ScoreBuildHistogram.java#L85-L102
131,154
h2oai/h2o-3
h2o-core/src/main/java/hex/grid/Grid.java
Grid.getModel
public Model getModel(MP params) { Key<Model> mKey = getModelKey(params); return mKey != null ? mKey.get() : null; }
java
public Model getModel(MP params) { Key<Model> mKey = getModelKey(params); return mKey != null ? mKey.get() : null; }
[ "public", "Model", "getModel", "(", "MP", "params", ")", "{", "Key", "<", "Model", ">", "mKey", "=", "getModelKey", "(", "params", ")", ";", "return", "mKey", "!=", "null", "?", "mKey", ".", "get", "(", ")", ":", "null", ";", "}" ]
Returns model for given combination of model parameters or null if the model does not exist. @param params parameters of the model @return A model run with these parameters, or null if the model does not exist.
[ "Returns", "model", "for", "given", "combination", "of", "model", "parameters", "or", "null", "if", "the", "model", "does", "not", "exist", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/grid/Grid.java#L129-L132
131,155
h2oai/h2o-3
h2o-core/src/main/java/hex/grid/Grid.java
Grid.getModels
public Model[] getModels() { Collection<Key<Model>> modelKeys = _models.values(); Model[] models = new Model[modelKeys.size()]; int i = 0; for (Key<Model> mKey : modelKeys) { models[i] = mKey != null ? mKey.get() : null; i++; } return models; }
java
public Model[] getModels() { Collection<Key<Model>> modelKeys = _models.values(); Model[] models = new Model[modelKeys.size()]; int i = 0; for (Key<Model> mKey : modelKeys) { models[i] = mKey != null ? mKey.get() : null; i++; } return models; }
[ "public", "Model", "[", "]", "getModels", "(", ")", "{", "Collection", "<", "Key", "<", "Model", ">>", "modelKeys", "=", "_models", ".", "values", "(", ")", ";", "Model", "[", "]", "models", "=", "new", "Model", "[", "modelKeys", ".", "size", "(", ...
Return all models included in this grid object. @return all models in this grid
[ "Return", "all", "models", "included", "in", "this", "grid", "object", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/grid/Grid.java#L233-L242
131,156
h2oai/h2o-3
h2o-core/src/main/java/hex/grid/Grid.java
Grid.getHyperValues
public Object[] getHyperValues(MP parms) { Object[] result = new Object[_hyper_names.length]; for (int i = 0; i < _hyper_names.length; i++) { result[i] = PojoUtils.getFieldValue(parms, _hyper_names[i], _field_naming_strategy); } return result; }
java
public Object[] getHyperValues(MP parms) { Object[] result = new Object[_hyper_names.length]; for (int i = 0; i < _hyper_names.length; i++) { result[i] = PojoUtils.getFieldValue(parms, _hyper_names[i], _field_naming_strategy); } return result; }
[ "public", "Object", "[", "]", "getHyperValues", "(", "MP", "parms", ")", "{", "Object", "[", "]", "result", "=", "new", "Object", "[", "_hyper_names", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_hyper_names", ".", "l...
Return value of hyper parameters used for this grid search. @param parms model parameters @return values of hyper parameters used by grid search producing this grid object.
[ "Return", "value", "of", "hyper", "parameters", "used", "for", "this", "grid", "search", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/grid/Grid.java#L299-L305
131,157
h2oai/h2o-3
h2o-core/src/main/java/hex/grid/Grid.java
Grid.remove_impl
@Override protected Futures remove_impl(final Futures fs) { for (Key<Model> k : _models.values()) k.remove(fs); _models.clear(); return fs; }
java
@Override protected Futures remove_impl(final Futures fs) { for (Key<Model> k : _models.values()) k.remove(fs); _models.clear(); return fs; }
[ "@", "Override", "protected", "Futures", "remove_impl", "(", "final", "Futures", "fs", ")", "{", "for", "(", "Key", "<", "Model", ">", "k", ":", "_models", ".", "values", "(", ")", ")", "k", ".", "remove", "(", "fs", ")", ";", "_models", ".", "clea...
Cleanup models and grid
[ "Cleanup", "models", "and", "grid" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/grid/Grid.java#L317-L323
131,158
h2oai/h2o-3
h2o-core/src/main/java/water/ExternalFrameWriterBackend.java
ExternalFrameWriterBackend.handleWriteToChunk
static void handleWriteToChunk(ByteChannel sock, AutoBuffer ab) throws IOException { String frameKey = ab.getStr(); byte[] expectedTypes = ab.getA1(); if( expectedTypes == null){ throw new RuntimeException("Expected types can't be null."); } int[] maxVecSizes = ab.getA4...
java
static void handleWriteToChunk(ByteChannel sock, AutoBuffer ab) throws IOException { String frameKey = ab.getStr(); byte[] expectedTypes = ab.getA1(); if( expectedTypes == null){ throw new RuntimeException("Expected types can't be null."); } int[] maxVecSizes = ab.getA4...
[ "static", "void", "handleWriteToChunk", "(", "ByteChannel", "sock", ",", "AutoBuffer", "ab", ")", "throws", "IOException", "{", "String", "frameKey", "=", "ab", ".", "getStr", "(", ")", ";", "byte", "[", "]", "expectedTypes", "=", "ab", ".", "getA1", "(", ...
Internal method use on the h2o backend side to handle writing to the chunk from non-h2o environment @param sock socket channel originating from non-h2o node @param ab {@link AutoBuffer} containing information necessary for preparing backend for writing
[ "Internal", "method", "use", "on", "the", "h2o", "backend", "side", "to", "handle", "writing", "to", "the", "chunk", "from", "non", "-", "h2o", "environment" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/ExternalFrameWriterBackend.java#L20-L86
131,159
h2oai/h2o-3
h2o-core/src/main/java/water/parser/Parser.java
Parser.getNextFile
private void getNextFile(final InputStream is) throws IOException { if (is instanceof java.util.zip.ZipInputStream) { ZipEntry ze = ((ZipInputStream) is).getNextEntry(); while (ze != null && ze.isDirectory()) ze = ((ZipInputStream) is).getNextEntry(); } }
java
private void getNextFile(final InputStream is) throws IOException { if (is instanceof java.util.zip.ZipInputStream) { ZipEntry ze = ((ZipInputStream) is).getNextEntry(); while (ze != null && ze.isDirectory()) ze = ((ZipInputStream) is).getNextEntry(); } }
[ "private", "void", "getNextFile", "(", "final", "InputStream", "is", ")", "throws", "IOException", "{", "if", "(", "is", "instanceof", "java", ".", "util", ".", "zip", ".", "ZipInputStream", ")", "{", "ZipEntry", "ze", "=", "(", "(", "ZipInputStream", ")",...
This method will try to get the next file to be parsed. It will skip over directories if encountered. @param is @throws IOException
[ "This", "method", "will", "try", "to", "get", "the", "next", "file", "to", "be", "parsed", ".", "It", "will", "skip", "over", "directories", "if", "encountered", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/Parser.java#L163-L169
131,160
h2oai/h2o-3
h2o-core/src/main/java/water/parser/Parser.java
Parser.readOneFile
private StreamInfo readOneFile(final InputStream is, final StreamParseWriter dout, InputStream bvs, StreamParseWriter nextChunk, int zidx, int fileIndex) throws IOException { int cidx = 0; StreamData din = new StreamData(is); // only check header for 2nd file onward since gu...
java
private StreamInfo readOneFile(final InputStream is, final StreamParseWriter dout, InputStream bvs, StreamParseWriter nextChunk, int zidx, int fileIndex) throws IOException { int cidx = 0; StreamData din = new StreamData(is); // only check header for 2nd file onward since gu...
[ "private", "StreamInfo", "readOneFile", "(", "final", "InputStream", "is", ",", "final", "StreamParseWriter", "dout", ",", "InputStream", "bvs", ",", "StreamParseWriter", "nextChunk", ",", "int", "zidx", ",", "int", "fileIndex", ")", "throws", "IOException", "{", ...
This method reads in one zip file. Before reading the file, it will check if the current file has the same number of columns and separator type as the previous files it has parssed. If they do not match, no file will be parsed in this case. @param is @param dout @param bvs @param nextChunk @param zidx @return @throw...
[ "This", "method", "reads", "in", "one", "zip", "file", ".", "Before", "reading", "the", "file", "it", "will", "check", "if", "the", "current", "file", "has", "the", "same", "number", "of", "columns", "and", "separator", "type", "as", "the", "previous", "...
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/Parser.java#L193-L217
131,161
h2oai/h2o-3
h2o-core/src/main/java/water/IcedWrapper.java
IcedWrapper.writeUnwrappedJSON
public AutoBuffer writeUnwrappedJSON( AutoBuffer ab ) { if (is_array) { if (t.equals("B")) return ab.putJSONA4(i_ar); // NOTE: upcast else if (t.equals("I")) return ab.putJSONA4(i_ar); else if (t.equals("L")) return ab.putJSONA8(l_ar); else if (t.equals("F")) ...
java
public AutoBuffer writeUnwrappedJSON( AutoBuffer ab ) { if (is_array) { if (t.equals("B")) return ab.putJSONA4(i_ar); // NOTE: upcast else if (t.equals("I")) return ab.putJSONA4(i_ar); else if (t.equals("L")) return ab.putJSONA8(l_ar); else if (t.equals("F")) ...
[ "public", "AutoBuffer", "writeUnwrappedJSON", "(", "AutoBuffer", "ab", ")", "{", "if", "(", "is_array", ")", "{", "if", "(", "t", ".", "equals", "(", "\"B\"", ")", ")", "return", "ab", ".", "putJSONA4", "(", "i_ar", ")", ";", "// NOTE: upcast", "else", ...
Write JSON for the wrapped value without putting it inside a JSON object.
[ "Write", "JSON", "for", "the", "wrapped", "value", "without", "putting", "it", "inside", "a", "JSON", "object", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/IcedWrapper.java#L243-L288
131,162
h2oai/h2o-3
h2o-core/src/main/java/water/api/schemas3/TwoDimTableV3.java
TwoDimTableV3.pythonify
private String pythonify(String n) { if (n == null || name.toLowerCase().contains("confusion")) return n; StringBuilder sb = new StringBuilder(); String [] modified = n.split("[\\s_]+"); for (int i=0; i<modified.length; ++i) { if (i!=0) sb.append("_"); String s = modified[i]; // if (!s....
java
private String pythonify(String n) { if (n == null || name.toLowerCase().contains("confusion")) return n; StringBuilder sb = new StringBuilder(); String [] modified = n.split("[\\s_]+"); for (int i=0; i<modified.length; ++i) { if (i!=0) sb.append("_"); String s = modified[i]; // if (!s....
[ "private", "String", "pythonify", "(", "String", "n", ")", "{", "if", "(", "n", "==", "null", "||", "name", ".", "toLowerCase", "(", ")", ".", "contains", "(", "\"confusion\"", ")", ")", "return", "n", ";", "StringBuilder", "sb", "=", "new", "StringBui...
Turn a description such as "Avg. Training MSE" into a JSON-usable field name "avg_training_mse" @param n @return
[ "Turn", "a", "description", "such", "as", "Avg", ".", "Training", "MSE", "into", "a", "JSON", "-", "usable", "field", "name", "avg_training_mse" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/schemas3/TwoDimTableV3.java#L119-L137
131,163
h2oai/h2o-3
h2o-core/src/main/java/water/api/SchemaServer.java
SchemaServer.registerAllSchemasIfNecessary
synchronized static public void registerAllSchemasIfNecessary(Schema ... schemas) { if (schemas_registered) return; long startTime = System.currentTimeMillis(); for (Schema schema : schemas) { register(schema); } Log.info("Registered: " + schemas().size() + " schemas in " + (System.cu...
java
synchronized static public void registerAllSchemasIfNecessary(Schema ... schemas) { if (schemas_registered) return; long startTime = System.currentTimeMillis(); for (Schema schema : schemas) { register(schema); } Log.info("Registered: " + schemas().size() + " schemas in " + (System.cu...
[ "synchronized", "static", "public", "void", "registerAllSchemasIfNecessary", "(", "Schema", "...", "schemas", ")", "{", "if", "(", "schemas_registered", ")", "return", ";", "long", "startTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "for", "(", ...
Find all schemas using reflection and register them.
[ "Find", "all", "schemas", "using", "reflection", "and", "register", "them", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/SchemaServer.java#L193-L202
131,164
h2oai/h2o-3
h2o-core/src/main/java/water/api/SchemaServer.java
SchemaServer.getSchema
public static Class<? extends Schema> getSchema(String name) { Class<? extends Schema> clz = schemas.get(name); if (clz == null) throw new H2ONotFoundArgumentException("Failed to find schema for schema_name: " + name, "Failed to find schema for schema_name: " + name + "\n" + "Did you f...
java
public static Class<? extends Schema> getSchema(String name) { Class<? extends Schema> clz = schemas.get(name); if (clz == null) throw new H2ONotFoundArgumentException("Failed to find schema for schema_name: " + name, "Failed to find schema for schema_name: " + name + "\n" + "Did you f...
[ "public", "static", "Class", "<", "?", "extends", "Schema", ">", "getSchema", "(", "String", "name", ")", "{", "Class", "<", "?", "extends", "Schema", ">", "clz", "=", "schemas", ".", "get", "(", "name", ")", ";", "if", "(", "clz", "==", "null", ")...
Lookup schema by name. @throws H2ONotFoundArgumentException if an appropriate schema is not found
[ "Lookup", "schema", "by", "name", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/SchemaServer.java#L215-L222
131,165
h2oai/h2o-3
h2o-core/src/main/java/water/api/SchemaServer.java
SchemaServer.schema
public static Schema schema(int version, Iced impl) { if (version == -1) version = getLatestVersion(); return schema(version, impl.getClass().getSimpleName()); }
java
public static Schema schema(int version, Iced impl) { if (version == -1) version = getLatestVersion(); return schema(version, impl.getClass().getSimpleName()); }
[ "public", "static", "Schema", "schema", "(", "int", "version", ",", "Iced", "impl", ")", "{", "if", "(", "version", "==", "-", "1", ")", "version", "=", "getLatestVersion", "(", ")", ";", "return", "schema", "(", "version", ",", "impl", ".", "getClass"...
For a given version and Iced object return an appropriate Schema instance, if any. @see #schema(int, java.lang.String) @deprecated
[ "For", "a", "given", "version", "and", "Iced", "object", "return", "an", "appropriate", "Schema", "instance", "if", "any", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/SchemaServer.java#L249-L252
131,166
h2oai/h2o-3
h2o-core/src/main/java/water/api/SchemaServer.java
SchemaServer.schema
public static Schema schema(int version, Class<? extends Iced> impl_class) { if (version == -1) version = getLatestVersion(); return schema(version, impl_class.getSimpleName()); }
java
public static Schema schema(int version, Class<? extends Iced> impl_class) { if (version == -1) version = getLatestVersion(); return schema(version, impl_class.getSimpleName()); }
[ "public", "static", "Schema", "schema", "(", "int", "version", ",", "Class", "<", "?", "extends", "Iced", ">", "impl_class", ")", "{", "if", "(", "version", "==", "-", "1", ")", "version", "=", "getLatestVersion", "(", ")", ";", "return", "schema", "("...
For a given version and Iced class return an appropriate Schema instance, if any. @param version Version of the schema to create, or pass -1 to use the latest version. @param impl_class Create schema corresponds to this implementation class. @throws H2OIllegalArgumentException if Class.newInstance() throws @see #schema...
[ "For", "a", "given", "version", "and", "Iced", "class", "return", "an", "appropriate", "Schema", "instance", "if", "any", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/SchemaServer.java#L262-L265
131,167
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/AbstractMojoWriter.java
AbstractMojoWriter.writeblob
protected final void writeblob(String filename, byte[] blob) throws IOException { ZipEntry archiveEntry = new ZipEntry(targetdir + filename); archiveEntry.setSize(blob.length); zos.putNextEntry(archiveEntry); zos.write(blob); zos.closeEntry(); }
java
protected final void writeblob(String filename, byte[] blob) throws IOException { ZipEntry archiveEntry = new ZipEntry(targetdir + filename); archiveEntry.setSize(blob.length); zos.putNextEntry(archiveEntry); zos.write(blob); zos.closeEntry(); }
[ "protected", "final", "void", "writeblob", "(", "String", "filename", ",", "byte", "[", "]", "blob", ")", "throws", "IOException", "{", "ZipEntry", "archiveEntry", "=", "new", "ZipEntry", "(", "targetdir", "+", "filename", ")", ";", "archiveEntry", ".", "set...
Write a binary file to the MOJO archive.
[ "Write", "a", "binary", "file", "to", "the", "MOJO", "archive", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/AbstractMojoWriter.java#L82-L88
131,168
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/AbstractMojoWriter.java
AbstractMojoWriter.writeln
protected final void writeln(String s, boolean escapeNewlines) { assert tmpfile != null : "No text file is currently being written"; tmpfile.append(escapeNewlines ? StringEscapeUtils.escapeNewlines(s) : s); tmpfile.append('\n'); }
java
protected final void writeln(String s, boolean escapeNewlines) { assert tmpfile != null : "No text file is currently being written"; tmpfile.append(escapeNewlines ? StringEscapeUtils.escapeNewlines(s) : s); tmpfile.append('\n'); }
[ "protected", "final", "void", "writeln", "(", "String", "s", ",", "boolean", "escapeNewlines", ")", "{", "assert", "tmpfile", "!=", "null", ":", "\"No text file is currently being written\"", ";", "tmpfile", ".", "append", "(", "escapeNewlines", "?", "StringEscapeUt...
Write a single line of text to a previously opened text file, escape new line characters if enabled.
[ "Write", "a", "single", "line", "of", "text", "to", "a", "previously", "opened", "text", "file", "escape", "new", "line", "characters", "if", "enabled", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/AbstractMojoWriter.java#L102-L106
131,169
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/AbstractMojoWriter.java
AbstractMojoWriter.finishWritingTextFile
protected final void finishWritingTextFile() throws IOException { assert tmpfile != null : "No text file is currently being written"; writeblob(tmpname, toBytes(tmpfile)); tmpfile = null; }
java
protected final void finishWritingTextFile() throws IOException { assert tmpfile != null : "No text file is currently being written"; writeblob(tmpname, toBytes(tmpfile)); tmpfile = null; }
[ "protected", "final", "void", "finishWritingTextFile", "(", ")", "throws", "IOException", "{", "assert", "tmpfile", "!=", "null", ":", "\"No text file is currently being written\"", ";", "writeblob", "(", "tmpname", ",", "toBytes", "(", "tmpfile", ")", ")", ";", "...
Finish writing a text file.
[ "Finish", "writing", "a", "text", "file", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/AbstractMojoWriter.java#L130-L134
131,170
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/AbstractMojoWriter.java
AbstractMojoWriter.writeDomains
private void writeDomains() throws IOException { int domIndex = 0; for (String[] domain : model.scoringDomains()) { if (domain == null) continue; startWritingTextFile(String.format("domains/d%03d.txt", domIndex++)); for (String category : domain) { writeln(category.replaceAll("\n", "\\...
java
private void writeDomains() throws IOException { int domIndex = 0; for (String[] domain : model.scoringDomains()) { if (domain == null) continue; startWritingTextFile(String.format("domains/d%03d.txt", domIndex++)); for (String category : domain) { writeln(category.replaceAll("\n", "\\...
[ "private", "void", "writeDomains", "(", ")", "throws", "IOException", "{", "int", "domIndex", "=", "0", ";", "for", "(", "String", "[", "]", "domain", ":", "model", ".", "scoringDomains", "(", ")", ")", "{", "if", "(", "domain", "==", "null", ")", "c...
Create files containing domain definitions for each categorical column.
[ "Create", "files", "containing", "domain", "definitions", "for", "each", "categorical", "column", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/AbstractMojoWriter.java#L239-L249
131,171
h2oai/h2o-3
h2o-core/src/main/java/water/api/schemas3/FindV3.java
FindV3.link
static String link(Key key, String column, long row, String match ) { return "/2/Find?key="+key+(column==null?"":"&column="+column)+"&row="+row+(match==null?"":"&match="+match); }
java
static String link(Key key, String column, long row, String match ) { return "/2/Find?key="+key+(column==null?"":"&column="+column)+"&row="+row+(match==null?"":"&match="+match); }
[ "static", "String", "link", "(", "Key", "key", ",", "String", "column", ",", "long", "row", ",", "String", "match", ")", "{", "return", "\"/2/Find?key=\"", "+", "key", "+", "(", "column", "==", "null", "?", "\"\"", ":", "\"&column=\"", "+", "column", "...
Helper so InspectV2 can link to FindV2
[ "Helper", "so", "InspectV2", "can", "link", "to", "FindV2" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/schemas3/FindV3.java#L31-L33
131,172
h2oai/h2o-3
h2o-core/src/main/java/water/TaskGetKey.java
TaskGetKey.start
static RPC<TaskGetKey> start( H2ONode target, Key key ) { // Do we have an old TaskGetKey in-progress? RPC<TaskGetKey> old = TGKS.get(key); if( old != null ) return old; // Make a new TGK. RPC<TaskGetKey> rpc = new RPC(target,new TaskGetKey(key),1.0f); if( (old=TGKS.putIfMatchUnlocked(key,rpc,nu...
java
static RPC<TaskGetKey> start( H2ONode target, Key key ) { // Do we have an old TaskGetKey in-progress? RPC<TaskGetKey> old = TGKS.get(key); if( old != null ) return old; // Make a new TGK. RPC<TaskGetKey> rpc = new RPC(target,new TaskGetKey(key),1.0f); if( (old=TGKS.putIfMatchUnlocked(key,rpc,nu...
[ "static", "RPC", "<", "TaskGetKey", ">", "start", "(", "H2ONode", "target", ",", "Key", "key", ")", "{", "// Do we have an old TaskGetKey in-progress?", "RPC", "<", "TaskGetKey", ">", "old", "=", "TGKS", ".", "get", "(", "key", ")", ";", "if", "(", "old", ...
Start an RPC to fetch a Value, handling short-cutting dup-fetches
[ "Start", "an", "RPC", "to", "fetch", "a", "Value", "handling", "short", "-", "cutting", "dup", "-", "fetches" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/TaskGetKey.java#L30-L40
131,173
h2oai/h2o-3
h2o-core/src/main/java/water/ClientDisconnectCheckThread.java
ClientDisconnectCheckThread.handleClientDisconnect
static void handleClientDisconnect(H2ONode client) { if(client != H2O.SELF) { if (H2O.isFlatfileEnabled()) { H2O.removeNodeFromFlatfile(client); } H2O.removeClient(client); } }
java
static void handleClientDisconnect(H2ONode client) { if(client != H2O.SELF) { if (H2O.isFlatfileEnabled()) { H2O.removeNodeFromFlatfile(client); } H2O.removeClient(client); } }
[ "static", "void", "handleClientDisconnect", "(", "H2ONode", "client", ")", "{", "if", "(", "client", "!=", "H2O", ".", "SELF", ")", "{", "if", "(", "H2O", ".", "isFlatfileEnabled", "(", ")", ")", "{", "H2O", ".", "removeNodeFromFlatfile", "(", "client", ...
This method checks whether the client is disconnected from this node due to some problem such as client or network is unreachable.
[ "This", "method", "checks", "whether", "the", "client", "is", "disconnected", "from", "this", "node", "due", "to", "some", "problem", "such", "as", "client", "or", "network", "is", "unreachable", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/ClientDisconnectCheckThread.java#L18-L25
131,174
h2oai/h2o-3
h2o-core/src/main/java/water/api/GridSearchHandler.java
GridSearchHandler.validateHyperParams
protected void validateHyperParams(P params, Map<String, Object[]> hyperParams) { List<SchemaMetadata.FieldMetadata> fsMeta = SchemaMetadata.getFieldMetadata(params); for (Map.Entry<String, Object[]> hparam : hyperParams.entrySet()) { SchemaMetadata.FieldMetadata fieldMetadata = null; // Found corre...
java
protected void validateHyperParams(P params, Map<String, Object[]> hyperParams) { List<SchemaMetadata.FieldMetadata> fsMeta = SchemaMetadata.getFieldMetadata(params); for (Map.Entry<String, Object[]> hparam : hyperParams.entrySet()) { SchemaMetadata.FieldMetadata fieldMetadata = null; // Found corre...
[ "protected", "void", "validateHyperParams", "(", "P", "params", ",", "Map", "<", "String", ",", "Object", "[", "]", ">", "hyperParams", ")", "{", "List", "<", "SchemaMetadata", ".", "FieldMetadata", ">", "fsMeta", "=", "SchemaMetadata", ".", "getFieldMetadata"...
Validate given hyper parameters with respect to type parameter P. It verifies that given parameters are annotated in P with @API annotation @param params regular model build parameters @param hyperParams map of hyper parameters
[ "Validate", "given", "hyper", "parameters", "with", "respect", "to", "type", "parameter", "P", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/GridSearchHandler.java#L131-L152
131,175
h2oai/h2o-3
h2o-core/src/main/java/hex/grid/GridSearch.java
GridSearch.buildModel
private Model buildModel(final MP params, Grid<MP> grid, int paramsIdx, String protoModelKey) { // Make sure that the model is not yet built (can be case of duplicated hyper parameters). // We first look in the grid _models cache, then we look in the DKV. // FIXME: get checksum here since model builder will...
java
private Model buildModel(final MP params, Grid<MP> grid, int paramsIdx, String protoModelKey) { // Make sure that the model is not yet built (can be case of duplicated hyper parameters). // We first look in the grid _models cache, then we look in the DKV. // FIXME: get checksum here since model builder will...
[ "private", "Model", "buildModel", "(", "final", "MP", "params", ",", "Grid", "<", "MP", ">", "grid", ",", "int", "paramsIdx", ",", "String", "protoModelKey", ")", "{", "// Make sure that the model is not yet built (can be case of duplicated hyper parameters).", "// We fir...
Build a model based on specified parameters and save it to resulting Grid object. Returns a model run with these parameters, typically built on demand and cached - expected to be an expensive operation. If the model in question is "in progress", a 2nd build will NOT be kicked off. This is a blocking call. If a new m...
[ "Build", "a", "model", "based", "on", "specified", "parameters", "and", "save", "it", "to", "resulting", "Grid", "object", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/grid/GridSearch.java#L278-L346
131,176
h2oai/h2o-3
h2o-core/src/main/java/hex/grid/GridSearch.java
GridSearch.gridKeyName
protected static Key<Grid> gridKeyName(String modelName, Frame fr) { if (fr == null || fr._key == null) { throw new IllegalArgumentException("The frame being grid-searched over must have a Key"); } return Key.make("Grid_" + modelName + "_" + fr._key.toString() + H2O.calcNextUniqueModelId("")); }
java
protected static Key<Grid> gridKeyName(String modelName, Frame fr) { if (fr == null || fr._key == null) { throw new IllegalArgumentException("The frame being grid-searched over must have a Key"); } return Key.make("Grid_" + modelName + "_" + fr._key.toString() + H2O.calcNextUniqueModelId("")); }
[ "protected", "static", "Key", "<", "Grid", ">", "gridKeyName", "(", "String", "modelName", ",", "Frame", "fr", ")", "{", "if", "(", "fr", "==", "null", "||", "fr", ".", "_key", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\...
Defines a key for a new Grid object holding results of grid search. @return a grid key for a particular modeling class and frame. @throws java.lang.IllegalArgumentException if frame is not saved to distributed store.
[ "Defines", "a", "key", "for", "a", "new", "Grid", "object", "holding", "results", "of", "grid", "search", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/grid/GridSearch.java#L354-L359
131,177
h2oai/h2o-3
h2o-core/src/main/java/hex/grid/GridSearch.java
GridSearch.startGridSearch
public static <MP extends Model.Parameters> Job<Grid> startGridSearch( final Key<Grid> destKey, final MP params, final Map<String, Object[]> hyperParams ) { return startGridSearch( destKey, params, hyperParams, new SimpleParametersBuilderFactory<MP>(), new...
java
public static <MP extends Model.Parameters> Job<Grid> startGridSearch( final Key<Grid> destKey, final MP params, final Map<String, Object[]> hyperParams ) { return startGridSearch( destKey, params, hyperParams, new SimpleParametersBuilderFactory<MP>(), new...
[ "public", "static", "<", "MP", "extends", "Model", ".", "Parameters", ">", "Job", "<", "Grid", ">", "startGridSearch", "(", "final", "Key", "<", "Grid", ">", "destKey", ",", "final", "MP", "params", ",", "final", "Map", "<", "String", ",", "Object", "[...
Start a new grid search job. <p>This method launches "classical" grid search traversing cartesian grid of parameters point-by-point. For more advanced hyperparameter search behavior call the referenced method. @param destKey A key to store result of grid search under. @param params Default parameters for ...
[ "Start", "a", "new", "grid", "search", "job", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/grid/GridSearch.java#L411-L422
131,178
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/Phaser.java
Phaser.doArrive
private int doArrive(int adjust) { final Phaser root = this.root; for (;;) { long s = (root == this) ? state : reconcileState(); int phase = (int)(s >>> PHASE_SHIFT); if (phase < 0) return phase; int counts = (int)s; int unarriv...
java
private int doArrive(int adjust) { final Phaser root = this.root; for (;;) { long s = (root == this) ? state : reconcileState(); int phase = (int)(s >>> PHASE_SHIFT); if (phase < 0) return phase; int counts = (int)s; int unarriv...
[ "private", "int", "doArrive", "(", "int", "adjust", ")", "{", "final", "Phaser", "root", "=", "this", ".", "root", ";", "for", "(", ";", ";", ")", "{", "long", "s", "=", "(", "root", "==", "this", ")", "?", "state", ":", "reconcileState", "(", ")...
Main implementation for methods arrive and arriveAndDeregister. Manually tuned to speed up and minimize race windows for the common case of just decrementing unarrived field. @param adjust value to subtract from state; ONE_ARRIVAL for arrive, ONE_DEREGISTER for arriveAndDeregister
[ "Main", "implementation", "for", "methods", "arrive", "and", "arriveAndDeregister", ".", "Manually", "tuned", "to", "speed", "up", "and", "minimize", "race", "windows", "for", "the", "common", "case", "of", "just", "decrementing", "unarrived", "field", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/Phaser.java#L352-L390
131,179
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/Phaser.java
Phaser.doRegister
private int doRegister(int registrations) { // adjustment to state long adjust = ((long)registrations << PARTIES_SHIFT) | registrations; final Phaser parent = this.parent; int phase; for (;;) { long s = (parent == null) ? state : reconcileState(); int coun...
java
private int doRegister(int registrations) { // adjustment to state long adjust = ((long)registrations << PARTIES_SHIFT) | registrations; final Phaser parent = this.parent; int phase; for (;;) { long s = (parent == null) ? state : reconcileState(); int coun...
[ "private", "int", "doRegister", "(", "int", "registrations", ")", "{", "// adjustment to state", "long", "adjust", "=", "(", "(", "long", ")", "registrations", "<<", "PARTIES_SHIFT", ")", "|", "registrations", ";", "final", "Phaser", "parent", "=", "this", "."...
Implementation of register, bulkRegister @param registrations number to add to both parties and unarrived fields. Must be greater than zero.
[ "Implementation", "of", "register", "bulkRegister" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/Phaser.java#L398-L449
131,180
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/Phaser.java
Phaser.awaitAdvance
public int awaitAdvance(int phase) { final Phaser root = this.root; long s = (root == this) ? state : reconcileState(); int p = (int)(s >>> PHASE_SHIFT); if (phase < 0) return phase; if (p == phase) return root.internalAwaitAdvance(phase, null); re...
java
public int awaitAdvance(int phase) { final Phaser root = this.root; long s = (root == this) ? state : reconcileState(); int p = (int)(s >>> PHASE_SHIFT); if (phase < 0) return phase; if (p == phase) return root.internalAwaitAdvance(phase, null); re...
[ "public", "int", "awaitAdvance", "(", "int", "phase", ")", "{", "final", "Phaser", "root", "=", "this", ".", "root", ";", "long", "s", "=", "(", "root", "==", "this", ")", "?", "state", ":", "reconcileState", "(", ")", ";", "int", "p", "=", "(", ...
Awaits the phase of this phaser to advance from the given phase value, returning immediately if the current phase is not equal to the given phase value or this phaser is terminated. @param phase an arrival phase number, or negative value if terminated; this argument is normally the value returned by a previous call to...
[ "Awaits", "the", "phase", "of", "this", "phaser", "to", "advance", "from", "the", "given", "phase", "value", "returning", "immediately", "if", "the", "current", "phase", "is", "not", "equal", "to", "the", "given", "phase", "value", "or", "this", "phaser", ...
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/Phaser.java#L694-L703
131,181
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/Phaser.java
Phaser.stateToString
private String stateToString(long s) { return super.toString() + "[phase = " + phaseOf(s) + " parties = " + partiesOf(s) + " arrived = " + arrivedOf(s) + "]"; }
java
private String stateToString(long s) { return super.toString() + "[phase = " + phaseOf(s) + " parties = " + partiesOf(s) + " arrived = " + arrivedOf(s) + "]"; }
[ "private", "String", "stateToString", "(", "long", "s", ")", "{", "return", "super", ".", "toString", "(", ")", "+", "\"[phase = \"", "+", "phaseOf", "(", "s", ")", "+", "\" parties = \"", "+", "partiesOf", "(", "s", ")", "+", "\" arrived = \"", "+", "ar...
Implementation of toString and string-based error messages
[ "Implementation", "of", "toString", "and", "string", "-", "based", "error", "messages" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/Phaser.java#L932-L937
131,182
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/Phaser.java
Phaser.releaseWaiters
private void releaseWaiters(int phase) { QNode q; // first element of queue Thread t; // its thread AtomicReference<QNode> head = (phase & 1) == 0 ? evenQ : oddQ; while ((q = head.get()) != null && q.phase != (int)(root.state >>> PHASE_SHIFT)) { if (head.com...
java
private void releaseWaiters(int phase) { QNode q; // first element of queue Thread t; // its thread AtomicReference<QNode> head = (phase & 1) == 0 ? evenQ : oddQ; while ((q = head.get()) != null && q.phase != (int)(root.state >>> PHASE_SHIFT)) { if (head.com...
[ "private", "void", "releaseWaiters", "(", "int", "phase", ")", "{", "QNode", "q", ";", "// first element of queue", "Thread", "t", ";", "// its thread", "AtomicReference", "<", "QNode", ">", "head", "=", "(", "phase", "&", "1", ")", "==", "0", "?", "evenQ"...
Removes and signals threads from queue for phase.
[ "Removes", "and", "signals", "threads", "from", "queue", "for", "phase", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/Phaser.java#L944-L956
131,183
h2oai/h2o-3
h2o-core/src/main/java/water/rapids/ast/prims/operators/AstBinOp.java
AstBinOp.alignCategoricals
private int[] alignCategoricals(String[] longerDomain, String[] shorterDomain) { String[] sortedLongerDomain = Arrays.copyOf(longerDomain, longerDomain.length); //Sort to make sure binary search is possible Arrays.sort(sortedLongerDomain); int[] transformedIndices = MemoryManager.malloc4(shorterDomain....
java
private int[] alignCategoricals(String[] longerDomain, String[] shorterDomain) { String[] sortedLongerDomain = Arrays.copyOf(longerDomain, longerDomain.length); //Sort to make sure binary search is possible Arrays.sort(sortedLongerDomain); int[] transformedIndices = MemoryManager.malloc4(shorterDomain....
[ "private", "int", "[", "]", "alignCategoricals", "(", "String", "[", "]", "longerDomain", ",", "String", "[", "]", "shorterDomain", ")", "{", "String", "[", "]", "sortedLongerDomain", "=", "Arrays", ".", "copyOf", "(", "longerDomain", ",", "longerDomain", "....
Produces a mapping array with indexes of the smaller pointing to the larger domain. @param longerDomain Domain to originally map from @param shorterDomain Domain to originally map to @return Cross-domain mapping as an array of primitive integers
[ "Produces", "a", "mapping", "array", "with", "indexes", "of", "the", "smaller", "pointing", "to", "the", "larger", "domain", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/rapids/ast/prims/operators/AstBinOp.java#L391-L403
131,184
h2oai/h2o-3
h2o-core/src/main/java/water/util/SBPrintStream.java
SBPrintStream.pj
public SBPrintStream pj(double s) { if (Double.isInfinite(s)) { append("Double.").append(s > 0 ? "POSITIVE_INFINITY" : "NEGATIVE_INFINITY"); } else if (Double.isNaN(s)) { append("Double.NaN"); } else { append(s); } return this; }
java
public SBPrintStream pj(double s) { if (Double.isInfinite(s)) { append("Double.").append(s > 0 ? "POSITIVE_INFINITY" : "NEGATIVE_INFINITY"); } else if (Double.isNaN(s)) { append("Double.NaN"); } else { append(s); } return this; }
[ "public", "SBPrintStream", "pj", "(", "double", "s", ")", "{", "if", "(", "Double", ".", "isInfinite", "(", "s", ")", ")", "{", "append", "(", "\"Double.\"", ")", ".", "append", "(", "s", ">", "0", "?", "\"POSITIVE_INFINITY\"", ":", "\"NEGATIVE_INFINITY\...
Java specific append of double
[ "Java", "specific", "append", "of", "double" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/util/SBPrintStream.java#L116-L125
131,185
h2oai/h2o-3
h2o-core/src/main/java/water/util/SBPrintStream.java
SBPrintStream.pj
public SBPrintStream pj(float s) { if (Float.isInfinite(s)) { append("Float.").append(s > 0 ? "POSITIVE_INFINITY" : "NEGATIVE_INFINITY"); } else if (Float.isNaN(s)) { append("Float.NaN"); } else { append(s).append('f'); } return this; }
java
public SBPrintStream pj(float s) { if (Float.isInfinite(s)) { append("Float.").append(s > 0 ? "POSITIVE_INFINITY" : "NEGATIVE_INFINITY"); } else if (Float.isNaN(s)) { append("Float.NaN"); } else { append(s).append('f'); } return this; }
[ "public", "SBPrintStream", "pj", "(", "float", "s", ")", "{", "if", "(", "Float", ".", "isInfinite", "(", "s", ")", ")", "{", "append", "(", "\"Float.\"", ")", ".", "append", "(", "s", ">", "0", "?", "\"POSITIVE_INFINITY\"", ":", "\"NEGATIVE_INFINITY\"",...
Java specific append of float
[ "Java", "specific", "append", "of", "float" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/util/SBPrintStream.java#L128-L137
131,186
h2oai/h2o-3
h2o-core/src/main/java/water/init/AbstractBuildVersion.java
AbstractBuildVersion.compiledOnDate
public final Date compiledOnDate() { SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT); try { return dateFormat.parse(compiledOn()); } catch (ParseException e) { return null; } }
java
public final Date compiledOnDate() { SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT); try { return dateFormat.parse(compiledOn()); } catch (ParseException e) { return null; } }
[ "public", "final", "Date", "compiledOnDate", "(", ")", "{", "SimpleDateFormat", "dateFormat", "=", "new", "SimpleDateFormat", "(", "DATE_FORMAT", ")", ";", "try", "{", "return", "dateFormat", ".", "parse", "(", "compiledOn", "(", ")", ")", ";", "}", "catch",...
Returns compile date for this H2O version or null.
[ "Returns", "compile", "date", "for", "this", "H2O", "version", "or", "null", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/init/AbstractBuildVersion.java#L46-L53
131,187
h2oai/h2o-3
h2o-core/src/main/java/water/parser/SVMLightParser.java
SVMLightParser.guessSetup
public static ParseSetup guessSetup(byte [] bits) { int lastNewline = bits.length-1; while(lastNewline > 0 && !CsvParser.isEOL(bits[lastNewline]))lastNewline--; if(lastNewline > 0) bits = Arrays.copyOf(bits,lastNewline+1); SVMLightParser p = new SVMLightParser(new ParseSetup(SVMLight_INFO, P...
java
public static ParseSetup guessSetup(byte [] bits) { int lastNewline = bits.length-1; while(lastNewline > 0 && !CsvParser.isEOL(bits[lastNewline]))lastNewline--; if(lastNewline > 0) bits = Arrays.copyOf(bits,lastNewline+1); SVMLightParser p = new SVMLightParser(new ParseSetup(SVMLight_INFO, P...
[ "public", "static", "ParseSetup", "guessSetup", "(", "byte", "[", "]", "bits", ")", "{", "int", "lastNewline", "=", "bits", ".", "length", "-", "1", ";", "while", "(", "lastNewline", ">", "0", "&&", "!", "CsvParser", ".", "isEOL", "(", "bits", "[", "...
Try to parse the bytes as svm light format, return a ParseSetupHandler with type SVMLight if the input is in svm light format, throw an exception otherwise.
[ "Try", "to", "parse", "the", "bytes", "as", "svm", "light", "format", "return", "a", "ParseSetupHandler", "with", "type", "SVMLight", "if", "the", "input", "is", "in", "svm", "light", "format", "throw", "an", "exception", "otherwise", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/SVMLightParser.java#L27-L40
131,188
h2oai/h2o-3
h2o-mapreduce-generic/src/main/java/water/hadoop/h2omapper.java
h2omapper.printArgs
private static void printArgs(String[] arr) { Log.info(""); Log.info("----- printArgs -----"); for (int i = 0; i < arr.length; i++) { String s = arr[i]; Log.info(i); if (s == null) { Log.info("null"); } else { Log.info(s); } } Log.info("----------"...
java
private static void printArgs(String[] arr) { Log.info(""); Log.info("----- printArgs -----"); for (int i = 0; i < arr.length; i++) { String s = arr[i]; Log.info(i); if (s == null) { Log.info("null"); } else { Log.info(s); } } Log.info("----------"...
[ "private", "static", "void", "printArgs", "(", "String", "[", "]", "arr", ")", "{", "Log", ".", "info", "(", "\"\"", ")", ";", "Log", ".", "info", "(", "\"----- printArgs -----\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "arr", ...
Under unusual debugging circumstances, it can be helpful to print out the command line arguments in this format. @param arr Array of command-line arguments.
[ "Under", "unusual", "debugging", "circumstances", "it", "can", "be", "helpful", "to", "print", "out", "the", "command", "line", "arguments", "in", "this", "format", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-mapreduce-generic/src/main/java/water/hadoop/h2omapper.java#L87-L101
131,189
h2oai/h2o-3
h2o-mapreduce-generic/src/main/java/water/hadoop/h2omapper.java
h2omapper.repairNullArgsAndWarnIfNecessary
private static void repairNullArgsAndWarnIfNecessary(String[] args) { boolean haveANullArg = false; for (String s : args) { if (s == null) { haveANullArg = true; break; } } if (haveANullArg) { Log.warn("Found a null command-line argument; printing all command-line argu...
java
private static void repairNullArgsAndWarnIfNecessary(String[] args) { boolean haveANullArg = false; for (String s : args) { if (s == null) { haveANullArg = true; break; } } if (haveANullArg) { Log.warn("Found a null command-line argument; printing all command-line argu...
[ "private", "static", "void", "repairNullArgsAndWarnIfNecessary", "(", "String", "[", "]", "args", ")", "{", "boolean", "haveANullArg", "=", "false", ";", "for", "(", "String", "s", ":", "args", ")", "{", "if", "(", "s", "==", "null", ")", "{", "haveANull...
This shouldn't be necessary, but is. In one really weird Hadoop environment, we saw an argument coming across from the driver as null. This shouldn't be possible but it happened. So repair it here, by forcing a null to really be the empty string. @param args Array of command line arguments
[ "This", "shouldn", "t", "be", "necessary", "but", "is", ".", "In", "one", "really", "weird", "Hadoop", "environment", "we", "saw", "an", "argument", "coming", "across", "from", "the", "driver", "as", "null", ".", "This", "shouldn", "t", "be", "possible", ...
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-mapreduce-generic/src/main/java/water/hadoop/h2omapper.java#L110-L128
131,190
h2oai/h2o-3
h2o-core/src/main/java/water/util/IcedBitSet.java
IcedBitSet.fill3
public void fill3( byte[] bits, AutoBuffer ab ) { int bitoff = ab.get2(); int nbits = ab.get4(); fill(bits,ab.position(),nbits,bitoff); ab.skip(bytes(nbits)); // Skip inline bitset }
java
public void fill3( byte[] bits, AutoBuffer ab ) { int bitoff = ab.get2(); int nbits = ab.get4(); fill(bits,ab.position(),nbits,bitoff); ab.skip(bytes(nbits)); // Skip inline bitset }
[ "public", "void", "fill3", "(", "byte", "[", "]", "bits", ",", "AutoBuffer", "ab", ")", "{", "int", "bitoff", "=", "ab", ".", "get2", "(", ")", ";", "int", "nbits", "=", "ab", ".", "get4", "(", ")", ";", "fill", "(", "bits", ",", "ab", ".", "...
Reload IcedBitSet from AutoBuffer
[ "Reload", "IcedBitSet", "from", "AutoBuffer" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/util/IcedBitSet.java#L114-L119
131,191
h2oai/h2o-3
h2o-parsers/h2o-avro-parser/src/main/java/water/parser/avro/AvroUtil.java
AvroUtil.isSupportedSchema
public static boolean isSupportedSchema(Schema s) { Schema.Type typ = s.getType(); switch (typ) { case BOOLEAN: case INT: case LONG: case FLOAT: case DOUBLE: case ENUM: case STRING: case NULL: case BYTES: return true; case UNION: // Flattenize...
java
public static boolean isSupportedSchema(Schema s) { Schema.Type typ = s.getType(); switch (typ) { case BOOLEAN: case INT: case LONG: case FLOAT: case DOUBLE: case ENUM: case STRING: case NULL: case BYTES: return true; case UNION: // Flattenize...
[ "public", "static", "boolean", "isSupportedSchema", "(", "Schema", "s", ")", "{", "Schema", ".", "Type", "typ", "=", "s", ".", "getType", "(", ")", ";", "switch", "(", "typ", ")", "{", "case", "BOOLEAN", ":", "case", "INT", ":", "case", "LONG", ":", ...
Return true if the given schema can be transformed into h2o type. @param s avro field schema @return true if the schema can be transformed into H2O type
[ "Return", "true", "if", "the", "given", "schema", "can", "be", "transformed", "into", "h2o", "type", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-avro-parser/src/main/java/water/parser/avro/AvroUtil.java#L21-L47
131,192
h2oai/h2o-3
h2o-parsers/h2o-avro-parser/src/main/java/water/parser/avro/AvroUtil.java
AvroUtil.schemaToColumnType
public static byte schemaToColumnType(Schema s) { Schema.Type typ = s.getType(); switch (typ) { case BOOLEAN: case INT: case LONG: case FLOAT: case DOUBLE: return Vec.T_NUM; case ENUM: return Vec.T_CAT; case STRING: return Vec.T_STR; case ...
java
public static byte schemaToColumnType(Schema s) { Schema.Type typ = s.getType(); switch (typ) { case BOOLEAN: case INT: case LONG: case FLOAT: case DOUBLE: return Vec.T_NUM; case ENUM: return Vec.T_CAT; case STRING: return Vec.T_STR; case ...
[ "public", "static", "byte", "schemaToColumnType", "(", "Schema", "s", ")", "{", "Schema", ".", "Type", "typ", "=", "s", ".", "getType", "(", ")", ";", "switch", "(", "typ", ")", "{", "case", "BOOLEAN", ":", "case", "INT", ":", "case", "LONG", ":", ...
Transform Avro schema into H2O type. @param s avro schema @return a byte representing H2O column type @throws IllegalArgumentException if schema is not supported
[ "Transform", "Avro", "schema", "into", "H2O", "type", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-avro-parser/src/main/java/water/parser/avro/AvroUtil.java#L56-L86
131,193
h2oai/h2o-3
h2o-parsers/h2o-avro-parser/src/main/java/water/parser/avro/AvroUtil.java
AvroUtil.flatSchema
public static Schema.Field[] flatSchema(Schema s) { List<Schema.Field> fields = s.getFields(); Schema.Field[] flatSchema = new Schema.Field[fields.size()]; int cnt = 0; for (Schema.Field f : fields) { if (isSupportedSchema(f.schema())) { flatSchema[cnt] = f; cnt++; } } ...
java
public static Schema.Field[] flatSchema(Schema s) { List<Schema.Field> fields = s.getFields(); Schema.Field[] flatSchema = new Schema.Field[fields.size()]; int cnt = 0; for (Schema.Field f : fields) { if (isSupportedSchema(f.schema())) { flatSchema[cnt] = f; cnt++; } } ...
[ "public", "static", "Schema", ".", "Field", "[", "]", "flatSchema", "(", "Schema", "s", ")", "{", "List", "<", "Schema", ".", "Field", ">", "fields", "=", "s", ".", "getFields", "(", ")", ";", "Schema", ".", "Field", "[", "]", "flatSchema", "=", "n...
The method "flattenize" the given Avro schema. @param s Avro schema @return List of supported fields which were extracted from original Schema
[ "The", "method", "flattenize", "the", "given", "Avro", "schema", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-parsers/h2o-avro-parser/src/main/java/water/parser/avro/AvroUtil.java#L145-L157
131,194
h2oai/h2o-3
h2o-core/src/main/java/water/Scope.java
Scope.exit
static public Key[] exit(Key... keep) { List<Key> keylist = new ArrayList<>(); if( keep != null ) for( Key k : keep ) if (k != null) keylist.add(k); Object[] arrkeep = keylist.toArray(); Arrays.sort(arrkeep); Stack<HashSet<Key>> keys = _scope.get()._keys; if (keys.size() > 0) { Futur...
java
static public Key[] exit(Key... keep) { List<Key> keylist = new ArrayList<>(); if( keep != null ) for( Key k : keep ) if (k != null) keylist.add(k); Object[] arrkeep = keylist.toArray(); Arrays.sort(arrkeep); Stack<HashSet<Key>> keys = _scope.get()._keys; if (keys.size() > 0) { Futur...
[ "static", "public", "Key", "[", "]", "exit", "(", "Key", "...", "keep", ")", "{", "List", "<", "Key", ">", "keylist", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", "(", "keep", "!=", "null", ")", "for", "(", "Key", "k", ":", "keep", ")", ...
Exit the inner-most Scope, remove all Keys created since the matching enter call except for the listed Keys. @return Returns the list of kept keys.
[ "Exit", "the", "inner", "-", "most", "Scope", "remove", "all", "Keys", "created", "since", "the", "matching", "enter", "call", "except", "for", "the", "listed", "Keys", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/Scope.java#L35-L51
131,195
h2oai/h2o-3
h2o-core/src/main/java/water/init/JarHash.java
JarHash.getResource2
public static InputStream getResource2(String uri) { try { // If -Dwebdev=1 is set in VM args, we're in front end dev mode, so skip the class loader. // This is to allow the front end scripts/styles/templates to be loaded from the build // directory during development. // Try all registere...
java
public static InputStream getResource2(String uri) { try { // If -Dwebdev=1 is set in VM args, we're in front end dev mode, so skip the class loader. // This is to allow the front end scripts/styles/templates to be loaded from the build // directory during development. // Try all registere...
[ "public", "static", "InputStream", "getResource2", "(", "String", "uri", ")", "{", "try", "{", "// If -Dwebdev=1 is set in VM args, we're in front end dev mode, so skip the class loader.", "// This is to allow the front end scripts/styles/templates to be loaded from the build", "// direct...
from a possible local dev build.
[ "from", "a", "possible", "local", "dev", "build", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/init/JarHash.java#L78-L106
131,196
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/ForkJoinPool.java
ForkJoinPool.checkPermission
private static void checkPermission() { SecurityManager security = System.getSecurityManager(); if (security != null) security.checkPermission(modifyThreadPermission); }
java
private static void checkPermission() { SecurityManager security = System.getSecurityManager(); if (security != null) security.checkPermission(modifyThreadPermission); }
[ "private", "static", "void", "checkPermission", "(", ")", "{", "SecurityManager", "security", "=", "System", ".", "getSecurityManager", "(", ")", ";", "if", "(", "security", "!=", "null", ")", "security", ".", "checkPermission", "(", "modifyThreadPermission", ")...
If there is a security manager, makes sure caller has permission to modify threads.
[ "If", "there", "is", "a", "security", "manager", "makes", "sure", "caller", "has", "permission", "to", "modify", "threads", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/ForkJoinPool.java#L470-L474
131,197
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/ForkJoinPool.java
ForkJoinPool.addWorker
private void addWorker() { Throwable ex = null; ForkJoinWorkerThread wt = null; try { if ((wt = factory.newThread(this)) != null) { wt.start(); return; } } catch (Throwable e) { ex = e; } deregisterWorker...
java
private void addWorker() { Throwable ex = null; ForkJoinWorkerThread wt = null; try { if ((wt = factory.newThread(this)) != null) { wt.start(); return; } } catch (Throwable e) { ex = e; } deregisterWorker...
[ "private", "void", "addWorker", "(", ")", "{", "Throwable", "ex", "=", "null", ";", "ForkJoinWorkerThread", "wt", "=", "null", ";", "try", "{", "if", "(", "(", "wt", "=", "factory", ".", "newThread", "(", "this", ")", ")", "!=", "null", ")", "{", "...
Tries to create and start a worker
[ "Tries", "to", "create", "and", "start", "a", "worker" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/ForkJoinPool.java#L1268-L1280
131,198
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/ForkJoinPool.java
ForkJoinPool.registerWorker
final void registerWorker(WorkQueue w) { Mutex lock = this.lock; lock.lock(); try { WorkQueue[] ws = workQueues; if (w != null && ws != null) { // skip on shutdown/failure int rs, n = ws.length, m = n - 1; int s = nextSeed += SEED...
java
final void registerWorker(WorkQueue w) { Mutex lock = this.lock; lock.lock(); try { WorkQueue[] ws = workQueues; if (w != null && ws != null) { // skip on shutdown/failure int rs, n = ws.length, m = n - 1; int s = nextSeed += SEED...
[ "final", "void", "registerWorker", "(", "WorkQueue", "w", ")", "{", "Mutex", "lock", "=", "this", ".", "lock", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "WorkQueue", "[", "]", "ws", "=", "workQueues", ";", "if", "(", "w", "!=", "null", ...
Callback from ForkJoinWorkerThread constructor to establish its poolIndex and record its WorkQueue. To avoid scanning bias due to packing entries in front of the workQueues array, we treat the array as a simple power-of-two hash table using per-thread seed as hash, expanding as needed. @param w the worker's queue
[ "Callback", "from", "ForkJoinWorkerThread", "constructor", "to", "establish", "its", "poolIndex", "and", "record", "its", "WorkQueue", ".", "To", "avoid", "scanning", "bias", "due", "to", "packing", "entries", "in", "front", "of", "the", "workQueues", "array", "...
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/ForkJoinPool.java#L1303-L1331
131,199
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/ForkJoinPool.java
ForkJoinPool.deregisterWorker
final void deregisterWorker(ForkJoinWorkerThread wt, Throwable ex) { Mutex lock = this.lock; WorkQueue w = null; if (wt != null && (w = wt.workQueue) != null) { w.runState = -1; // ensure runState is set stealCount.getAndAdd(w.totalSteals + w.nsteals); ...
java
final void deregisterWorker(ForkJoinWorkerThread wt, Throwable ex) { Mutex lock = this.lock; WorkQueue w = null; if (wt != null && (w = wt.workQueue) != null) { w.runState = -1; // ensure runState is set stealCount.getAndAdd(w.totalSteals + w.nsteals); ...
[ "final", "void", "deregisterWorker", "(", "ForkJoinWorkerThread", "wt", ",", "Throwable", "ex", ")", "{", "Mutex", "lock", "=", "this", ".", "lock", ";", "WorkQueue", "w", "=", "null", ";", "if", "(", "wt", "!=", "null", "&&", "(", "w", "=", "wt", "....
Final callback from terminating worker, as well as upon failure to construct or start a worker in addWorker. Removes record of worker from array, and adjusts counts. If pool is shutting down, tries to complete termination. @param wt the worker thread or null if addWorker failed @param ex the exception causing failure...
[ "Final", "callback", "from", "terminating", "worker", "as", "well", "as", "upon", "failure", "to", "construct", "or", "start", "a", "worker", "in", "addWorker", ".", "Removes", "record", "of", "worker", "from", "array", "and", "adjusts", "counts", ".", "If",...
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/ForkJoinPool.java#L1342-L1375