start_ml_model_training_job
async
¶
start_ml_model_training_job(
data_processing_job_id: str,
train_model_s3_location: str,
*,
config_overrides: Optional[AsyncneptunedataClientConfig] = 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/async_neptunedata.py
3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 | |