Skip to content

Commit

Permalink
fixed empty model returned issue with R clients.
Browse files Browse the repository at this point in the history
  • Loading branch information
wendycwong committed Oct 20, 2024
1 parent a4078e3 commit 7fa3082
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 0 additions & 2 deletions h2o-r/h2o-package/R/kvstore.R
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ h2o.getModel <- function(model_id) {
}
}

if (identical("glm", json$algo) || identical("hglm", json$algo)) {
.newH2OModel(Class = Class,
model_id = model_id,
algorithm = json$algo,
Expand All @@ -368,7 +367,6 @@ h2o.getModel <- function(model_id) {
have_pojo = json$have_pojo,
have_mojo = json$have_mojo,
model = model)
}
}

#' Retrieves an instance of \linkS4class{H2OSegmentModels} for a given id.
Expand Down
11 changes: 11 additions & 0 deletions h2o-r/tests/testdir_algos/hglm/runit_GH_8487_coefs_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ test.HGLMData1 <- function() {
seed=12345, max_iterations=10, em_epsilon=0.0000001, random_intercept=TRUE, standardize=FALSE)
browser()
coeff <- h2o.coef(hglm_model)
coeff_random_effects <- h2o.coef_random(hglm_model)
coeff_random_effects_norm <- h2o.coef_random_norm(hglm_model)
level_2_names <- h2o.level_2_names(hglm_model)
coefs_random_names <- h2o.coefs_random_names(hglm_model)
coefs_random_names_norm <- h2o.coefs_random_names_norm(hglm_model)
scoring_history <- h2o.scoring_history(hglm_model)
t_mat <- h2o.matrix_T(hglm_model)
residual_var <- h2o.residual_variance(hglm_model)
icc <- h2o.icc(hglm_model)
mean_res_fixed <- h2o.mean_residual_fixed(hglm_model)
mse <- h2o.mse(hglm_model)
print(hglm_model)

}
Expand Down

0 comments on commit 7fa3082

Please sign in to comment.