start_ml_model_training_job
¶
start_ml_model_training_job(
data_processing_job_id: str,
train_model_s3_location: str,
*,
config_overrides: Optional[neptunedataClientConfig] = None,
id: Optional[str] = None,
previous_model_training_job_id: Optional[str] = None,
sagemaker_iam_role_arn: Optional[str] = None,
neptune_iam_role_arn: Optional[str] = None,
base_processing_instance_type: Optional[str] = None,
training_instance_type: Optional[str] = None,
training_instance_volume_size_in_gb: Optional[int] = None,
training_time_out_in_seconds: Optional[int] = None,
max_hpo_number_of_training_jobs: Optional[int] = None,
max_hpo_parallel_training_jobs: Optional[int] = None,
subnets: Optional[StringList] = None,
security_group_ids: Optional[StringList] = None,
volume_encryption_kms_key: Optional[str] = None,
s3_output_encryption_kms_key: Optional[str] = None,
enable_managed_spot_training: Optional[bool] = None,
custom_model_training_parameters: Optional[CustomModelTrainingParameters] = None,
) -> StartMLModelTrainingJobOutput
Creates a new Neptune ML model training job. See Model training using the modeltraining command.
When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the neptune-db:StartMLModelTrainingJob IAM action in that cluster.
Parameters:
-
id(Optional[str], default:None) –A unique identifier for the new job. The default is An autogenerated UUID.
-
previous_model_training_job_id(Optional[str], default:None) –The job ID of a completed model-training job that you want to update incrementally based on updated data.
-
data_processing_job_id(str) –The job ID of the completed data-processing job that has created the data that the training will work with.
-
train_model_s3_location(str) –The location in Amazon S3 where the model artifacts are to be stored.
-
sagemaker_iam_role_arn(Optional[str], default:None) –The ARN of an IAM role for SageMaker execution.This must be listed in your DB cluster parameter group or an error will occur.
-
neptune_iam_role_arn(Optional[str], default:None) –The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.
-
base_processing_instance_type(Optional[str], default:None) –The type of ML instance used in preparing and managing training of ML models. This is a CPU instance chosen based on memory requirements for processing the training data and model.
-
training_instance_type(Optional[str], default:None) –The type of ML instance used for model training. All Neptune ML models support CPU, GPU, and multiGPU training. The default is
ml.p3.2xlarge. Choosing the right instance type for training depends on the task type, graph size, and your budget. -
training_instance_volume_size_in_gb(Optional[int], default:None) –The disk volume size of the training instance. Both input data and the output model are stored on disk, so the volume size must be large enough to hold both data sets. The default is 0. If not specified or 0, Neptune ML selects a disk volume size based on the recommendation generated in the data processing step.
-
training_time_out_in_seconds(Optional[int], default:None) –Timeout in seconds for the training job. The default is 86,400 (1 day).
-
max_hpo_number_of_training_jobs(Optional[int], default:None) –Maximum total number of training jobs to start for the hyperparameter tuning job. The default is 2. Neptune ML automatically tunes the hyperparameters of the machine learning model. To obtain a model that performs well, use at least 10 jobs (in other words, set
maxHPONumberOfTrainingJobsto 10). In general, the more tuning runs, the better the results. -
max_hpo_parallel_training_jobs(Optional[int], default:None) –Maximum number of parallel training jobs to start for the hyperparameter tuning job. The default is 2. The number of parallel jobs you can run is limited by the available resources on your training instance.
-
subnets(Optional[StringList], default:None) –The IDs of the subnets in the Neptune VPC. The default is None.
-
security_group_ids(Optional[StringList], default:None) –The VPC security group IDs. The default is None.
-
volume_encryption_kms_key(Optional[str], default:None) –The Amazon Key Management Service (KMS) key that SageMaker uses to encrypt data on the storage volume attached to the ML compute instances that run the training job. The default is None.
-
s3_output_encryption_kms_key(Optional[str], default:None) –The Amazon Key Management Service (KMS) key that SageMaker uses to encrypt the output of the processing job. The default is none.
-
enable_managed_spot_training(Optional[bool], default:None) –Optimizes the cost of training machine-learning models by using Amazon Elastic Compute Cloud spot instances. The default is
False. -
custom_model_training_parameters(Optional[CustomModelTrainingParameters], default:None) –The configuration for custom model training. This is a JSON object.
Raises:
-
BadRequestException–Raised when a request is submitted that cannot be processed.
-
ClientTimeoutException–Raised when a request timed out in the client.
-
ConstraintViolationException–Raised when a value in a request field did not satisfy required constraints.
-
IllegalArgumentException–Raised when an argument in a request is not supported.
-
InvalidArgumentException–Raised when an argument in a request has an invalid value.
-
InvalidParameterException–Raised when a parameter value is not valid.
-
MissingParameterException–Raised when a required parameter is missing.
-
MLResourceNotFoundException–Raised when a specified machine-learning resource could not be found.
-
PreconditionsFailedException–Raised when a precondition for processing a request is not satisfied.
-
TooManyRequestsException–Raised when the number of requests being processed exceeds the limit.
-
UnsupportedOperationException–Raised when a request attempts to initiate an operation that is not supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_neptunedata/_services/neptunedata.py
2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 | |