endpoints 명령을 사용하여 추론 엔드포인트 관리 - Amazon Neptune

endpoints 명령을 사용하여 추론 엔드포인트 관리

Neptune ML endpoints 명령을 사용하여 추론 엔드포인트를 생성하거나, 상태를 확인하거나, 삭제하거나, 기존 추론 엔드포인트를 나열할 수 있습니다.

Neptune ML endpoints 명령을 사용하여 추론 엔드포인트 생성

훈련 작업으로 만든 모델에서 추론 엔드포인트를 생성하는 Neptune ML endpoints 명령은 다음과 같습니다.

curl \ -X POST https://(your Neptune endpoint)/ml/endpoints -H 'Content-Type: application/json' \ -d '{ "id" : "(a unique ID for the new endpoint)", "mlModelTrainingJobId": "(the model-training job-id of a completed job)" }'

훈련 작업으로 만든 모델에서 기존 추론 엔드포인트를 업데이트하는 Neptune ML endpoints 명령은 다음과 같습니다.

curl \ -X POST https://(your Neptune endpoint)/ml/endpoints -H 'Content-Type: application/json' \ -d '{ "id" : "(a unique ID for the new endpoint)", "update" : "true", "mlModelTrainingJobId": "(the model-training job-id of a completed job)" }'

모델 변환 작업으로 만든 모델에서 추론 엔드포인트를 생성하는 Neptune ML endpoints 명령은 다음과 같습니다.

curl \ -X POST https://(your Neptune endpoint)/ml/endpoints -H 'Content-Type: application/json' \ -d '{ "id" : "(a unique ID for the new endpoint)", "mlModelTransformJobId": "(the model-training job-id of a completed job)" }'

모델 변환 작업으로 만든 모델에서 기존 추론 엔드포인트를 업데이트하는 Neptune ML endpoints 명령은 다음과 같습니다.

curl \ -X POST https://(your Neptune endpoint)/ml/endpoints -H 'Content-Type: application/json' \ -d '{ "id" : "(a unique ID for the new endpoint)", "update" : "true", "mlModelTransformJobId": "(the model-training job-id of a completed job)" }'
추론 엔드포인트를 생성하는 endpoints 파라미터
  • id   –   (선택 사항) 새 추론 엔드포인트의 고유 식별자입니다.

    유형: 문자열. 기본값: 자동 생성된 타임스탬프 이름.

  • mlModelTrainingJobId   –   추론 엔드포인트가 가리키는 모델을 생성하여 완료된 모델 훈련 작업의 작업 ID입니다.

    유형: 문자열.

    참고: mlModelTrainingJobId 또는 mlModelTransformJobId를 제공해야 합니다.

  • mlModelTransformJobId   –   완료된 모델 변환 작업의 작업 ID입니다.

    유형: 문자열.

    참고: mlModelTrainingJobId 또는 mlModelTransformJobId를 제공해야 합니다.

  • update   –   (선택 사항) 이 파라미터가 있는 경우 이 파라미터는 업데이트 요청임을 나타냅니다.

    유형: 부울. 기본값: false

    참고: mlModelTrainingJobId 또는 mlModelTransformJobId를 제공해야 합니다.

  • neptuneIamRoleArn – (선택 사항) SageMaker AI와 Amazon S3 리소스에 대한 Neptune의 액세스 권한을 제공하는 IAM 역할의 ARN입니다.

    유형: 문자열. 참고: 이는 DB 클러스터 파라미터 그룹에 나열되어 있어야 합니다. 그렇지 않으면 오류가 발생합니다.

  • modelName   –   (선택 사항) 훈련을 위한 모델 유형입니다. 기본적으로 ML 모델은 자동으로 데이터 처리에 사용되는 modelType을 기반으로 하지만, 여기에서 다른 모델 유형을 지정할 수도 있습니다.

    유형: 문자열. 기본값: 이기종 그래프용 rgcn 및 지식 그래프용 kge. 유효 값: 이기종 그래프의 경우 rgcn, 지식 그래프의 경우 kge, transe, distmult 또는 rotate.

  • instanceType   –   (선택 사항) 온라인 서비스에 사용되는 ML 인스턴스 유형입니다.

    유형: 문자열. 기본값: ml.m5.xlarge.

    참고: 추론 엔드포인트의 ML 인스턴스를 선택하는 것은 작업 유형, 그래프 크기, 예산에 따라 달라집니다. 추론 엔드포인트용 인스턴스 선택을(를) 참조하세요.

  • instanceCount   –   (선택 사항) 예측을 위해 엔드포인트에 배포할 최소 Amazon EC2 인스턴스 수입니다.

    유형: 정수. 기본값: 1.

  • volumeEncryptionKMSKey   –   (선택 사항) SageMaker AI가 엔드포인트를 실행하는 ML 컴퓨팅 인스턴스에 연결된 스토리지 볼륨에서 데이터를 암호화하는 데 사용하는 AWS Key Management Service(AWS KMS) 키입니다.

    유형: 문자열. 기본값: 없음.

Neptune ML endpoints 명령을 사용하여 추론 엔드포인트의 상태 가져오기

인스턴스 엔드포인트 상태를 나타내는 샘플 Neptune ML endpoints 명령은 다음과 같습니다.

curl -s \ "https://(your Neptune endpoint)/ml/endpoints/(the inference endpoint ID)" \ | python -m json.tool
인스턴스 엔드포인트 상태를 나타내는 endpoints 파라미터
  • id   –   (필수) 추론 엔드포인트의 고유 식별자입니다.

    유형: 문자열.

  • neptuneIamRoleArn – (선택 사항) SageMaker AI와 Amazon S3 리소스에 대한 Neptune의 액세스 권한을 제공하는 IAM 역할의 ARN입니다.

    유형: 문자열. 참고: 이는 DB 클러스터 파라미터 그룹에 나열되어 있어야 합니다. 그렇지 않으면 오류가 발생합니다.

Neptune ML endpoints 명령을 사용하여 인스턴스 엔드포인트 삭제

인스턴스 엔드포인트를 삭제하는 샘플 Neptune ML endpoints 명령은 다음과 같습니다.

curl -s \ -X DELETE "https://(your Neptune endpoint)/ml/endpoints/(the inference endpoint ID)"

아니면 다음을 사용해도 됩니다.

curl -s \ -X DELETE "https://(your Neptune endpoint)/ml/endpoints/(the inference endpoint ID)?clean=true"
추론 엔드포인트를 삭제하는 endpoints 파라미터
  • id   –   (필수) 추론 엔드포인트의 고유 식별자입니다.

    유형: 문자열.

  • neptuneIamRoleArn – (선택 사항) SageMaker AI와 Amazon S3 리소스에 대한 Neptune의 액세스 권한을 제공하는 IAM 역할의 ARN입니다.

    유형: 문자열. 참고: 이는 DB 클러스터 파라미터 그룹에 나열되어 있어야 합니다. 그렇지 않으면 오류가 발생합니다.

  • clean   –   (선택 사항) 이 엔드포인트와 관련된 모든 아티팩트도 삭제해야 함을 나타냅니다.

    유형: 부울. 기본값: FALSE.

Neptune ML endpoints 명령을 사용하여 추론 엔드포인트 나열

추론 엔드포인트를 나열하는 Neptune ML endpoints 명령은 다음과 같습니다.

curl -s "https://(your Neptune endpoint)/ml/endpoints" \ | python -m json.tool

아니면 다음을 사용해도 됩니다.

curl -s "https://(your Neptune endpoint)/ml/endpoints?maxItems=3" \ | python -m json.tool
추론 엔드포인트를 나열하는 dataprocessing 파라미터
  • maxItems   –   (선택 사항) 반환할 최대 항목 수입니다.

    유형: 정수. 기본값: 10. 최대 허용 값: 1024.

  • neptuneIamRoleArn – (선택 사항) SageMaker AI와 Amazon S3 리소스에 대한 Neptune의 액세스 권한을 제공하는 IAM 역할의 ARN입니다.

    유형: 문자열. 참고: 이는 DB 클러스터 파라미터 그룹에 나열되어 있어야 합니다. 그렇지 않으면 오류가 발생합니다.