create_ml_endpoint
async
¶
create_ml_endpoint(
*,
config_overrides: Optional[AsyncneptunedataClientConfig] = None,
id: Optional[str] = None,
ml_model_training_job_id: Optional[str] = None,
ml_model_transform_job_id: Optional[str] = None,
update: Optional[bool] = None,
neptune_iam_role_arn: Optional[str] = None,
model_name: Optional[str] = None,
instance_type: Optional[str] = None,
instance_count: Optional[int] = None,
volume_encryption_kms_key: Optional[str] = None,
) -> CreateMLEndpointOutput
Creates a new Neptune ML inference endpoint that lets you query one specific model that the model-training process constructed. See Managing inference endpoints using the endpoints 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:CreateMLEndpoint IAM action in that cluster.
Parameters:
-
id(Optional[str], default:None) –A unique identifier for the new inference endpoint. The default is an autogenerated timestamped name.
-
ml_model_training_job_id(Optional[str], default:None) –The job Id of the completed model-training job that has created the model that the inference endpoint will point to. You must supply either the
mlModelTrainingJobIdor themlModelTransformJobId. -
ml_model_transform_job_id(Optional[str], default:None) –The job Id of the completed model-transform job. You must supply either the
mlModelTrainingJobIdor themlModelTransformJobId. -
update(Optional[bool], default:None) –If set to
true,updateindicates that this is an update request. The default isfalse. You must supply either themlModelTrainingJobIdor themlModelTransformJobId. -
neptune_iam_role_arn(Optional[str], default:None) –The ARN of an IAM role providing Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will be thrown.
-
model_name(Optional[str], default:None) –Model type for training. By default the Neptune ML model is automatically based on the
modelTypeused in data processing, but you can specify a different model type here. The default isrgcnfor heterogeneous graphs andkgefor knowledge graphs. The only valid value for heterogeneous graphs isrgcn. Valid values for knowledge graphs are:kge,transe,distmult, androtate. -
instance_type(Optional[str], default:None) –The type of Neptune ML instance to use for online servicing. The default is
ml.m5.xlarge. Choosing the ML instance for an inference endpoint depends on the task type, the graph size, and your budget. -
instance_count(Optional[int], default:None) –The minimum number of Amazon EC2 instances to deploy to an endpoint for prediction. The default is 1
-
volume_encryption_kms_key(Optional[str], default:None) –The Amazon Key Management Service (Amazon 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.
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
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | |