src/sagemaker_xgboost_container/training.py
def train(training_environment):
    """Run XGBoost training in either algorithm mode or using a user supplied module in local SageMaker environment.
    The user supplied module and its dependencies are downloaded from S3.
    Training is invoked by calling a "train" function in the user supplied module.

    Args:
        training_environment: training environment object containing environment variables,
                               training arguments and hyperparameters
    """
    if training_environment.user_entry_point is not None:
        logger.info('Invoking user training script.')
        framework.modules.run_module(training_environment.module_dir, training_environment.to_cmd_args(),
                                     training_environment.to_env_vars(), training_environment.module_name,
                                     capture_error=False)
    else:
        logger.info("Running XGBoost Sagemaker in algorithm mode")
        _env.write_env_vars(training_environment.to_env_vars())

        run_algorithm_mode()
Run XGBoost training in either algorithm mode or using a user supplied module in local SageMaker environment.
    The user supplied module and its dependencies are downloaded from S3.
    Training is invoked by calling a "train" function in the user supplied module.

    Args:
        training_environment: training environment object containing environment variables,
                               training arguments and hyperparameters
    
Run XGBoost training in either algorithm mode or using a user supplied module in local SageMaker environment.
The user supplied module and its dependencies are downloaded from S3.
Training is invoked by calling a "train" function in the user supplied module.
Run XGBoost training in either algorithm mode or using a user supplied module in local SageMaker environment . The user supplied module and its dependencies are downloaded from S3 . Training is invoked by calling a " train " function in the user supplied module .
def train(training_environment):
    if training_environment.user_entry_point is not None:
        logger.info('Invoking user training script.')
        framework.modules.run_module(training_environment.module_dir, training_environment.to_cmd_args(),
                                     training_environment.to_env_vars(), training_environment.module_name,
                                     capture_error=False)
    else:
        logger.info("Running XGBoost Sagemaker in algorithm mode")
        _env.write_env_vars(training_environment.to_env_vars())
        run_algorithm_mode()
def train ( training_environment ) : if training_environment . user_entry_point is not None : logger . info ( 'Invoking user training script.' ) framework . modules . run_module ( training_environment . module_dir , training_environment . to_cmd_args ( ) , training_environment . to_env_vars ( ) , training_environment . module_name , capture_error = False ) else : logger . info ( "Running XGBoost Sagemaker in algorithm mode" ) _env . write_env_vars ( training_environment . to_env_vars ( ) ) run_algorithm_mode ( )
Run XGBoost training in either algorithm mode or using a user supplied module in local SageMaker environment.
Run XGBoost training in either algorithm mode or using a user supplied module in local SageMaker environment .
"""Run XGBoost training in either algorithm mode or using a user supplied module in local SageMaker environment.
    The user supplied module and its dependencies are downloaded from S3.
    Training is invoked by calling a "train" function in the user supplied module.

    Args:
        training_environment: training environment object containing environment variables,
                               training arguments and hyperparameters
    """
training_environment
training environment object containing environment variables,
training arguments and hyperparameters
training environment object containing environment variables training arguments and hyperparameters