h2o-py/h2o/estimators/estimator_base.py
def _check_and_save_parm(self, parms, parameter_name, parameter_value):
        """
        If a parameter is not stored in parms dict save it there (even though the value is None).
        Else check if the parameter has been already set during initialization of estimator. If yes, check the new value is the same or not. If the values are different, set the last passed value to params dict and throw UserWarning.
        """
        if parameter_name not in parms:
            parms[parameter_name] = parameter_value
        elif parameter_value is not None and parms[parameter_name] != parameter_value:
            parms[parameter_name] = parameter_value
            warnings.warn("\n\n\t`%s` parameter has been already set and had a different value in `train` method. The last passed value \"%s\" is used." % (parameter_name, parameter_value), UserWarning, stacklevel=2)
def _check_and_save_parm(self, parms, parameter_name, parameter_value):
        """
        If a parameter is not stored in parms dict save it there (even though the value is None).
        Else check if the parameter has been already set during initialization of estimator. If yes, check the new value is the same or not. If the values are different, set the last passed value to params dict and throw UserWarning.
        """
        if parameter_name not in parms:
            parms[parameter_name] = parameter_value
        elif parameter_value is not None and parms[parameter_name] != parameter_value:
            parms[parameter_name] = parameter_value
            warnings.warn("\n\n\t`%s` parameter has been already set and had a different value in `train` method. The last passed value \"%s\" is used." % (parameter_name, parameter_value), UserWarning, stacklevel=2)
If a parameter is not stored in parms dict save it there (even though the value is None).
        Else check if the parameter has been already set during initialization of estimator. If yes, check the new value is the same or not. If the values are different, set the last passed value to params dict and throw UserWarning.