デバッガーXGBoostレポートルールを使用してXGBoost推定器を作成する SageMaker - Amazon SageMaker

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

デバッガーXGBoostレポートルールを使用してXGBoost推定器を作成する SageMaker

CreateXgboostReport ルールは、トレーニングジョブから次の出力テンソルを収集します。

  • hyperparameters - 最初のステップで保存します。

  • metrics - 5 ステップごとに損失と精度を保存します。

  • feature_importance - 5 ステップごとに保存します。

  • predictions - 5 ステップごとに保存します。

  • labels - 5 ステップごとに保存します。

出力テンソルはデフォルトの S3 バケットに保存されます。例えば、s3://sagemaker-<region>-<12digit_account_id>/<base-job-name>/debug-output/ と指定します。

XGBoost トレーニングジョブの SageMaker 推定器を作成するときは、次のサンプルコードに示すようにルールを指定します。

Using the SageMaker generic estimator
import boto3 import sagemaker from sagemaker.estimator import Estimator from sagemaker import image_uris from sagemaker.debugger import Rule, rule_configs rules=[ Rule.sagemaker(rule_configs.create_xgboost_report()) ] region = boto3.Session().region_name xgboost_container=sagemaker.image_uris.retrieve("xgboost", region, "1.2-1") estimator=Estimator( role=sagemaker.get_execution_role() image_uri=xgboost_container, base_job_name="debugger-xgboost-report-demo", instance_count=1, instance_type="ml.m5.2xlarge", # Add the Debugger XGBoost report rule rules=rules ) estimator.fit(wait=False)