Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/h2oai/h2o
Browse files Browse the repository at this point in the history
  • Loading branch information
nmadabhushi committed May 19, 2015
2 parents 9cec825 + b179f61 commit fd9a67f
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/h2o-package/R/Algorithms.R
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ h2o.deeplearning <- function(x, y, data, key = "",
noGrid <- noGrid && (missing(override_with_best_model) || length(override_with_best_model) == 1)
noGrid <- noGrid && (missing(seed) || length(seed) == 1)
noGrid <- noGrid && (missing(input_dropout_ratio) || length(input_dropout_ratio) == 1)
noGrid <- noGrid && (missing(hidden_dropout_ratios) || (!is.list(hidden_dropout_ratios) && length(hidden_dropout_ratios) > 1))
noGrid <- noGrid && (missing(hidden_dropout_ratios) || !(is.list(hidden_dropout_ratios) && length(hidden_dropout_ratios) > 1))
noGrid <- noGrid && (missing(max_w2) || length(max_w2) == 1)
noGrid <- noGrid && (missing(initial_weight_distribution) || length(initial_weight_distribution) == 1)
noGrid <- noGrid && (missing(initial_weight_scale) || length(initial_weight_scale) == 1)
Expand Down
11 changes: 11 additions & 0 deletions R/h2o-package/R/Internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ h2o.setLogPath <- function(path, type) {
.h2o.__SET_DOMAIN = "2/SetDomains.json"
.h2o.__PAGE_ALLMODELS = "2/Models.json"
.h2o.__GAINS <- "2/GainsLiftTable.json"
.h2o.__PAGE_GARBAGECOLLECT = "GarbageCollect.json"

.h2o.__PAGE_IMPUTE= "2/Impute.json"
.h2o.__PAGE_EXEC2 = "2/Exec2.json"
Expand Down Expand Up @@ -1054,3 +1055,13 @@ h2o.getFrame <- function(h2o, key) {
"gamma" = Gamma(link))
}
}

#
# This function is internal intentionally.
#
# Call it as:
# h2o:::.h2o.garbageCollect(localH2O)
#
.h2o.garbageCollect <- function(client) {
res = .h2o.__remoteSend(client, .h2o.__PAGE_GARBAGECOLLECT)
}
1 change: 1 addition & 0 deletions R/tests/testdir_jira/runit_hex_2022_prior_constraints.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ test.Priors.BetaConstraints <- function(conn) {
modelStack = h2o.importFile(conn, pathToFile)
betaConstraints.hex = h2o.importFile(conn, pathToConstraints)
beta_nointercept.hex <- betaConstraints.hex[1:nrow(betaConstraints.hex)-1,]
beta_nointercept.hex

## Set Parameters (default standardization = T)
betaConstraints = as.data.frame(betaConstraints.hex)
Expand Down
1 change: 1 addition & 0 deletions scripts/validate_r_cmd_check_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def process(self):
r"^The Title field starts with the package name.",
r"^The Date field is over a month old.",

r"^\n",
r"^New submission",

r"^Package was archived on CRAN",
Expand Down
34 changes: 34 additions & 0 deletions src/main/java/water/api/GarbageCollect.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package water.api;

import water.DTask;
import water.H2O;
import water.H2ONode;
import water.RPC;
import water.util.Log;

public class GarbageCollect extends Request {
private static class GCTask extends DTask<GCTask> {
public GCTask() {
}

@Override public void compute2() {
Log.info("Calling System.gc() now...");
System.gc();
Log.info("System.gc() finished");
tryComplete();
}

@Override public byte priority() {
return H2O.MIN_HI_PRIORITY;
}
}

@Override public RequestBuilders.Response serve(){
for (H2ONode node : H2O.CLOUD._memary) {
GCTask t = new GCTask();
new RPC<GCTask>(node, t).call().get();
}

return RequestBuilders.Response.doneEmpty();
}
}
2 changes: 2 additions & 0 deletions src/main/java/water/api/RequestServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ public enum API_VERSION {
registerRequest(new UnlockKeys());
registerRequest(new Order());
registerRequest(new RemoveVec());
registerRequest(new GarbageCollect());
} else {
Request.addToNavbar(registerRequest(new MatrixMultiply()), "Matrix Multiply", "Beta");
Request.addToNavbar(registerRequest(new hex.LR2()), "Linear Regression2", "Beta");
Expand All @@ -189,6 +190,7 @@ public enum API_VERSION {
Request.addToNavbar(registerRequest(new UnlockKeys()), "Unlock Keys (use with caution)","Beta");
Request.addToNavbar(registerRequest(new Order()), "Order", "Beta");
Request.addToNavbar(registerRequest(new RemoveVec()), "RemoveVec", "Beta");
Request.addToNavbar(registerRequest(new GarbageCollect()), "GarbageCollect", "Beta");
}

registerRequest(new Up());
Expand Down

0 comments on commit fd9a67f

Please sign in to comment.