建立機器學習產品的需求和最佳實務 - AWS Marketplace

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

建立機器學習產品的需求和最佳實務

您的買方務必能輕鬆測試模型套件和演算法產品。下列各節說明建立機器學習 (ML) 產品清單和 ML 產品的最佳實務的需求。如需需求和建議的完整摘要,請參閱 ML 產品清單的需求和建議摘要

注意

如果您的已發佈產品不符合這些要求, AWS Marketplace 代表可能會與您聯絡,以協助您滿足這些要求。

必要的資產

建立機器學習產品清單之前,請確定您擁有下列必要資產:

  • Amazon Resource Name (ARN) – 在您從中發佈的 中提供模型套件或演算法資源 AWS 區域 的 ARN (請參閱 支援 AWS 區域 發佈)。

    • 模型套件的 ARN 具有以下表單: arn:aws:sagemaker:<region>:<account-id>:model-package/<model-package-name>

    • 演算法的 ARN 具有以下表單: arn:aws:sagemaker:<region>:<account-id>:algorithm/<algorithm-name>

  • 用量資訊的需求 – 提供有關輸入、輸出和程式碼範例的詳細資訊。

  • 輸入和輸出的需求 – 提供檔案或文字。

  • Jupyter 筆記本的需求 – 示範完整的產品用量。

ML 產品的一般最佳實務

提供機器學習產品的下列資訊:

  • 如需產品說明,請包含下列項目:

    • 模型的功能

    • 目標客戶是誰

    • 最重要的使用案例是什麼

    • 模型的訓練方式或已使用的資料量

    • 什麼是效能指標,以及使用的驗證資料

    • 如果是醫療,無論您的模型是否用於診斷用途

  • 根據預設,機器學習產品會設定為具有公有可見性。不過,您可以建立具有私有可見性的產品。如需詳細資訊,請參閱建立您的產品清單

  • (選用) 針對付費產品,提供 14–30 天的免費試用,讓客戶試用您的產品。如需詳細資訊,請參閱的機器學習產品定價 AWS Marketplace

  • (選用) 對於模型套件產品,如果您想要在產品清單頁面上啟用即時產品示範,請聯絡AWS Marketplace 賣方營運團隊。產品示範可讓潛在買方直接在清單頁面上嘗試模型,而不需訂閱或自行部署模型。

用量資訊的需求

描述產品預期輸入和輸出 (使用範例) 的明確用量資訊,對於推動正面買方體驗至關重要。

對於您新增至產品清單的每個新資源版本,您必須提供用量資訊。

若要新增第一次發佈之新產品的使用資訊,請登入 AWS Marketplace 管理入口網站 主控台。從產品下拉式清單中,選擇機器學習。選取您的產品。在啟動下的產品概觀選項中,提供模型套件或演算法資源的 ARN,然後選擇新增

若要編輯特定版本的現有用量資訊,請選擇啟動選項下的編輯,然後選擇編輯版本

輸入和輸出的需求

清楚說明您的格式,以及輸入和輸出的範例,對於協助您的買方了解和使用您的產品非常重要。此了解可協助您的買方對輸入資料執行任何必要的轉換,以取得最佳推論結果。

將 Amazon SageMaker AI 資源新增至產品清單時,系統會提示您輸入下列項目。

推論輸入和輸出

對於推論輸入,請提供即時端點和批次轉換任務的輸入格式。包含程式碼片段,以進行任何必要的資料預先處理。包含支援的 MIME 內容類型 (例如 image/jpegimage/pngimage/bmp)、適用的值說明和限制。包含 GitHub 上託管的輸入範例。

針對推論輸出,提供即時端點和批次轉換任務的輸出格式。如果適用,請包含輸出 MIME 內容類型 (例如,Application/jsonImage/jpeg) 和值的描述。包含 GitHub 上託管的輸出範例。

針對範例,提供可搭配您產品的輸入檔案。如果您的模型執行多類別分類,請為每個類別提供至少一個範例輸入檔案。

訓練輸入

訓練模型的資訊區段中,提供輸入資料格式和程式碼片段,以進行任何必要的資料預先處理。包含支援的 MIME 內容類型 (例如 image/jpegimage/pngimage/bmp)、適用的值說明和限制。請務必包含 GitHub 上託管的輸入範例。

說明買方可以提供的選用和強制性功能,並指定是否支援PIPE輸入模式。如果支援分散式訓練 (使用超過 1 個 CPU/GPU 執行個體進行訓練),請指定此項目。針對調校,請列出建議的超參數。

Jupyter 筆記本的需求

將 SageMaker AI 資源新增至產品清單時,請提供 GitHub 上託管的範例 Jupyter 筆記本的連結,示範完整的工作流程,而不會要求買方上傳或尋找任何資料。

使用 AWS SDK for Python (Boto)。開發良好的範例筆記本可讓買方更輕鬆地嘗試和使用您的清單。

對於模型套件產品,您的範例筆記本示範輸入資料的準備、建立用於即時推論的端點,以及批次轉換任務的效能。如需詳細資訊,請參閱 GitHub 上的模型套件清單和範例筆記本。如需範例筆記本,請參閱 auto_insurance。筆記本適用於所有 AWS 區域,無需輸入任何參數,也無需買方尋找範例資料。

注意

未顯示多個可能輸入和資料預先處理步驟的未開發範例 Jupyter 筆記本,可能會讓買方難以完全了解產品的價值主張。

對於演算法產品,範例筆記本示範完整的訓練、調校、模型建立、建立即時推論的端點,以及批次轉換任務的效能。如需詳細資訊,請參閱 GitHub 上的演算法清單和範例筆記本。如需範例筆記本,請參閱 GitHub 上的 amazon_demo_productautoml。這些範例筆記本可在所有區域中運作,而無需輸入任何參數,也不需要買方尋找範例資料。

注意

缺少範例訓練資料可能會使您的買方無法成功執行 Jupyter 筆記本。未開發的範例筆記本可能會使您的買方無法使用您的產品並阻礙採用。

ML 產品清單的需求和建議摘要

下表提供機器學習產品清單頁面的需求和建議摘要。

詳細資訊 對於模型套件清單 對於演算法清單
Product descriptions
Explain in detail what the product does for supported content types (for example, “detects X in images"). Required Required
Provide compelling and differentiating information about the product (avoid adjectives like "best" or unsubstantiated claims). Recommended Recommended
List most important use case(s) for this product. Required Required
Describe the data (source and size) it was trained on and list any known limitations. Required Not applicable
Describe the core framework that the model was built on. Recommended Recommended
Summarize model performance metric on validation data (for example, "XX.YY percent accuracy benchmarked using the Z dataset"). Required Not applicable
Summarize model latency and/or throughput metrics on recommended instance type. Required Not applicable
Describe the algorithm category. For example, “This decision forest regression algorithm is based on an ensemble of tree-structured classifiers that are built using the general technique of bootstrap aggregation and a random choice of features.” Not applicable Required
Usage information
For inference, provide the input format for both the real-time endpoint and batch transform job. Include supported MIME content types (for example, 影像/JPEG, 圖片/png, image/bmp), description of values if applicable, and limitations. See 輸入和輸出的需求. Required Required
For inference, provide input samples for both the real-time endpoint and batch transform job. Samples must be hosted on GitHub. See 輸入和輸出的需求. Required Required
For inference, provide the output format for both the real-time endpoint and batch transform job. Include output MIME content type (for example, application/json, 影像/JPEG) and description of values if applicable. See 輸入和輸出的需求. Required Required
For inference, provide output samples for both the real-time endpoint and batch transform job. Samples must be hosted on GitHub. See 輸入和輸出的需求. Required Required
For inference, provide an example of using an endpoint or batch transform job. Include a code example using the AWS Command Line Interface (AWS CLI) commands or using an AWS SDK. Required Required
For training, provide input format. Include supported MIME content types (for example, 影像/JPEG, 圖片/png, image/bmp), description of values if applicable, and limitations (for example, minimum rows of data required). See 輸入和輸出的需求. Not applicable Required
For training, provide input samples hosted on GitHub. See 輸入和輸出的需求. Not applicable Required
For training, provide an example of performing training jobs. Describe the supported hyperparameters, their ranges, and their overall impact. Specify if the algorithm supports hyperparameter tuning, distributed training, or GPU instances. Include code example such as AWS CLI commands or using an AWS SDK, for example. Not applicable Required
Provide a Jupyter notebook hosted on GitHub demonstrating complete use of your product. See Jupyter 筆記本的需求. Required Required
Provide technical information related to the usage of the product, including user manuals and sample data. Recommended Recommended