src/sagemaker_xgboost_container/callback.py
def add_debugging(callbacks, hyperparameters, train_dmatrix,
                  val_dmatrix=None, json_config_path=None):
    """Add a sagemaker debug hook to a list of callbacks.
    :param callbacks: List of callback functions.
    :param hyperparameters: Dict of hyperparamters.
                            Same as `params` in xgb.train(params, dtrain).
    :param train_dmatrix: Training data set.
    :param val_dmatrix: Validation data set.
    :param json_config_path: If specified, this json config will be used
                             instead of default config file.
    """
    try:
        hook = Hook.hook_from_config(json_config_path)
        hook.hyperparameters = hyperparameters
        hook.train_data = train_dmatrix
        if val_dmatrix is not None:
            hook.validation_data = val_dmatrix
        callbacks.append(hook)
        logging.info("Debug hook created from config")
    except Exception as e:
        logging.debug("Failed to create debug hook", e)
        return
Add a sagemaker debug hook to a list of callbacks.
    :param callbacks: List of callback functions.
    :param hyperparameters: Dict of hyperparamters.
                            Same as `params` in xgb.train(params, dtrain).
    :param train_dmatrix: Training data set.
    :param val_dmatrix: Validation data set.
    :param json_config_path: If specified, this json config will be used
                             instead of default config file.
    
Add a sagemaker debug hook to a list of callbacks.
Add a sagemaker debug hook to a list of callbacks .
def add_debugging(callbacks, hyperparameters, train_dmatrix,
                  val_dmatrix=None, json_config_path=None):
    try:
        hook = Hook.hook_from_config(json_config_path)
        hook.hyperparameters = hyperparameters
        hook.train_data = train_dmatrix
        if val_dmatrix is not None:
            hook.validation_data = val_dmatrix
        callbacks.append(hook)
        logging.info("Debug hook created from config")
    except Exception as e:
        logging.debug("Failed to create debug hook", e)
        return
def add_debugging ( callbacks , hyperparameters , train_dmatrix , val_dmatrix = None , json_config_path = None ) : try : hook = Hook . hook_from_config ( json_config_path ) hook . hyperparameters = hyperparameters hook . train_data = train_dmatrix if val_dmatrix is not None : hook . validation_data = val_dmatrix callbacks . append ( hook ) logging . info ( "Debug hook created from config" ) except Exception as e : logging . debug ( "Failed to create debug hook" , e ) return
Add a sagemaker debug hook to a list of callbacks.
Add a sagemaker debug hook to a list of callbacks .
"""Add a sagemaker debug hook to a list of callbacks.
    :param callbacks: List of callback functions.
    :param hyperparameters: Dict of hyperparamters.
                            Same as `params` in xgb.train(params, dtrain).
    :param train_dmatrix: Training data set.
    :param val_dmatrix: Validation data set.
    :param json_config_path: If specified, this json config will be used
                             instead of default config file.
    """
callbacks
List of callback functions.
List of callback functions .
hyperparameters
Dict of hyperparamters.
Same as `params` in xgb.train(params, dtrain).
Dict of hyperparamters . Same as ` params ` in xgb . train ( params dtrain ) .
train_dmatrix
Training data set.
Training data set .
val_dmatrix
Validation data set.
Validation data set .
json_config_path
If specified, this json config will be used
instead of default config file.
If specified this json config will be used instead of default config file .