Create a new Amazon SageMaker training job from the estimator.

        Args:
            estimator (sagemaker.estimator.EstimatorBase): Estimator object created by the user.
            inputs (str): Parameters used when called  :meth:`~sagemaker.estimator.EstimatorBase.fit`.

        Returns:
            sagemaker.estimator._TrainingJob: Constructed object that captures all information about the started
            training job.

def start_new(cls, estimator, inputs):
        """Create a new Amazon SageMaker training job from the estimator.

        Args:
            estimator (sagemaker.estimator.EstimatorBase): Estimator object created by the user.
            inputs (str): Parameters used when called  :meth:`~sagemaker.estimator.EstimatorBase.fit`.

        Returns:
            sagemaker.estimator._TrainingJob: Constructed object that captures all information about the started
            training job.
        """

        local_mode = estimator.sagemaker_session.local_mode
        model_uri = estimator.model_uri

        # Allow file:// input only in local mode
        if cls._is_local_channel(inputs) or cls._is_local_channel(model_uri):
            if not local_mode:
                raise ValueError('File URIs are supported in local mode only. Please use a S3 URI instead.')

        config = _Job._load_config(inputs, estimator)

        if estimator.hyperparameters() is not None:
            hyperparameters = {str(k): str(v) for (k, v) in estimator.hyperparameters().items()}

        train_args = config.copy()
        train_args['input_mode'] = estimator.input_mode
        train_args['job_name'] = estimator._current_job_name
        train_args['hyperparameters'] = hyperparameters
        train_args['tags'] = estimator.tags
        train_args['metric_definitions'] = estimator.metric_definitions

        if estimator.enable_network_isolation():
            train_args['enable_network_isolation'] = True

        if estimator.encrypt_inter_container_traffic:
            train_args['encrypt_inter_container_traffic'] = True

        if isinstance(estimator, sagemaker.algorithm.AlgorithmEstimator):
            train_args['algorithm_arn'] = estimator.algorithm_arn
        else:
            train_args['image'] = estimator.train_image()

        estimator.sagemaker_session.train(**train_args)

        return cls(estimator.sagemaker_session, estimator._current_job_name)