Skip to content

Commit

Permalink
GH-16026: remove custom_metric_func and nparallelism from schema. Cus…
Browse files Browse the repository at this point in the history
…tom_metric_func is not supported and nparallelism is set depending on deployment environment.
  • Loading branch information
wendycwong committed Mar 4, 2024
1 parent 70f43c9 commit 5d5bf7e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
1 change: 0 additions & 1 deletion h2o-algos/src/main/java/hex/schemas/ModelSelectionV3.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public static final class ModelSelectionParametersV3 extends ModelParametersSche
"max_after_balance_size",
"max_confusion_matrix_size",
"max_runtime_secs",
"custom_metric_func",
"nparallelism",
"max_predictor_number", // denote maximum number of predictors to build models for
"min_predictor_number",
Expand Down
19 changes: 0 additions & 19 deletions h2o-py/h2o/estimators/model_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def __init__(self,
max_after_balance_size=5.0, # type: float
max_confusion_matrix_size=20, # type: int
max_runtime_secs=0.0, # type: float
custom_metric_func=None, # type: Optional[str]
nparallelism=0, # type: int
max_predictor_number=1, # type: int
min_predictor_number=1, # type: int
Expand Down Expand Up @@ -290,9 +289,6 @@ def __init__(self,
:param max_runtime_secs: Maximum allowed runtime in seconds for model training. Use 0 to disable.
Defaults to ``0.0``.
:type max_runtime_secs: float
:param custom_metric_func: Reference to custom evaluation function, format: `language:keyName=funcName`
Defaults to ``None``.
:type custom_metric_func: str, optional
:param nparallelism: number of models to build in parallel. Defaults to 0.0 which is adaptive to the system
capability
Defaults to ``0``.
Expand Down Expand Up @@ -383,7 +379,6 @@ def __init__(self,
self.max_after_balance_size = max_after_balance_size
self.max_confusion_matrix_size = max_confusion_matrix_size
self.max_runtime_secs = max_runtime_secs
self.custom_metric_func = custom_metric_func
self.nparallelism = nparallelism
self.max_predictor_number = max_predictor_number
self.min_predictor_number = min_predictor_number
Expand Down Expand Up @@ -1124,20 +1119,6 @@ def max_runtime_secs(self, max_runtime_secs):
assert_is_type(max_runtime_secs, None, numeric)
self._parms["max_runtime_secs"] = max_runtime_secs

@property
def custom_metric_func(self):
"""
Reference to custom evaluation function, format: `language:keyName=funcName`
Type: ``str``.
"""
return self._parms.get("custom_metric_func")

@custom_metric_func.setter
def custom_metric_func(self, custom_metric_func):
assert_is_type(custom_metric_func, None, str)
self._parms["custom_metric_func"] = custom_metric_func

@property
def nparallelism(self):
"""
Expand Down
7 changes: 0 additions & 7 deletions h2o-r/h2o-package/R/modelselection.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
#' @param max_after_balance_size Maximum relative size of the training data after balancing class counts (can be less than 1.0). Requires
#' balance_classes. Defaults to 5.0.
#' @param max_runtime_secs Maximum allowed runtime in seconds for model training. Use 0 to disable. Defaults to 0.
#' @param custom_metric_func Reference to custom evaluation function, format: `language:keyName=funcName`
#' @param nparallelism number of models to build in parallel. Defaults to 0.0 which is adaptive to the system capability Defaults to
#' 0.
#' @param max_predictor_number Maximum number of predictors to be considered when building GLM models. Defaults to 1. Defaults to 1.
Expand Down Expand Up @@ -190,7 +189,6 @@ h2o.modelSelection <- function(x,
class_sampling_factors = NULL,
max_after_balance_size = 5.0,
max_runtime_secs = 0,
custom_metric_func = NULL,
nparallelism = 0,
max_predictor_number = 1,
min_predictor_number = 1,
Expand Down Expand Up @@ -315,8 +313,6 @@ h2o.modelSelection <- function(x,
parms$max_after_balance_size <- max_after_balance_size
if (!missing(max_runtime_secs))
parms$max_runtime_secs <- max_runtime_secs
if (!missing(custom_metric_func))
parms$custom_metric_func <- custom_metric_func
if (!missing(nparallelism))
parms$nparallelism <- nparallelism
if (!missing(max_predictor_number))
Expand Down Expand Up @@ -387,7 +383,6 @@ h2o.modelSelection <- function(x,
class_sampling_factors = NULL,
max_after_balance_size = 5.0,
max_runtime_secs = 0,
custom_metric_func = NULL,
nparallelism = 0,
max_predictor_number = 1,
min_predictor_number = 1,
Expand Down Expand Up @@ -517,8 +512,6 @@ h2o.modelSelection <- function(x,
parms$max_after_balance_size <- max_after_balance_size
if (!missing(max_runtime_secs))
parms$max_runtime_secs <- max_runtime_secs
if (!missing(custom_metric_func))
parms$custom_metric_func <- custom_metric_func
if (!missing(nparallelism))
parms$nparallelism <- nparallelism
if (!missing(max_predictor_number))
Expand Down

0 comments on commit 5d5bf7e

Please sign in to comment.