建立要查詢的推論端點 - Amazon Neptune

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

建立要查詢的推論端點

推論端點可讓您查詢模型訓練程序所建構的特定模型。端點會附加至屬於給定類型且訓練程序能夠產生的最佳表現模型。然後,端點能夠接受來自 Neptune 的 Gemlin 查詢,並傳回該模型對查詢中輸入的預測。在您建立了推論端點之後,它會保持作用中狀態,直到您將其刪除為止。

管理 Neptune ML 的推論端點

在您從 Neptune 匯出的資料上完成了模型訓練之後,您可以使用 curl (或 awscurl) 命令建立推論端點,如下所示:

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)" }'

您也可以從完成的模型轉換工作所建立的模型建立推論端點,方式大致相同:

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-transform job-id of a completed job)" }'

如何使用這些命令的詳細資訊會在 endpoints 命令 加以說明,其中還有如何取得端點狀態、如何刪除端點,以及如何列出所有推論端點的相關資訊。