

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

# Feature Store Feature Processor パイプラインの作成と実行
<a name="feature-store-feature-processor-create-execute-pipeline"></a>

Feature Processor SDK は、Feature Processor 定義をフルマネージド SageMaker AI パイプラインに昇格させるための API を提供しています。Pipelines の詳細については、「[Pipelines の概要](pipelines-overview.md)」を参照してください。Feature Processor 定義を SageMaker AI パイプラインに変換するには、`to_pipeline` API と Feature Processor 定義を組み合わせて使用します。Feature Processor 定義の実行をスケジュールしたり、CloudWatch メトリクスで運用面からモニタリングしたり、EventBridge と統合してイベントソースまたはサブスクライバーとして機能させたりできます。Pipelines で作成したパイプラインのモニタリングの詳細については、「[Amazon SageMaker Feature Store Feature Processor パイプラインのモニタリング](feature-store-feature-processor-monitor-pipeline.md)」を参照してください。

Feature Processor パイプラインを表示するには、「[コンソールからパイプライン実行を表示する](feature-store-use-with-studio.md#feature-store-view-feature-processor-pipeline-executions-studio)」を参照してください。

関数にも `@remote` デコレータがデコレートされていれば、その設定は Feature Processor パイプラインに引き継がれます。`@remote` デコレータを使用して、コンピューティングインスタンスのタイプと数、ランタイムの依存関係、ネットワークとセキュリティの設定などの高度な設定を指定できます。

次の例では、`to_pipeline` API と `execute` API を使用します。

```
from sagemaker.feature_store.feature_processor import (
    execute, to_pipeline, describe, TransformationCode
)

pipeline_name="feature-processor-pipeline"
pipeline_arn = to_pipeline(
    pipeline_name=pipeline_name,
    step=transform,
    transformation_code=TransformationCode(s3_uri="s3://bucket/prefix"),
)

pipeline_execution_arn = execute(
    pipeline_name=pipeline_name
)
```

`to_pipeline` API は意味的にはアップサート操作です。パイプラインが既に存在する場合は更新し、存在しない場合はパイプラインを作成します。

`to_pipeline` API は必要に応じて Feature Processor 定義を含むファイルを参照する Amazon S3 URI を受け入れ、それを Feature Processor パイプラインに関連付けて、SageMaker AI 機械学習リネージ内の変換関数とそのバージョンを追跡します。

アカウント内のすべての Feature Processor パイプラインのリストを取得するには、`list_pipelines` API を使用します。`describe` API へのその後のリクエストでは、Pipelines やスケジュールの詳細などの Feature Processor パイプラインに関連する詳細が返されます。

次の例では、`list_pipelines` API と `describe` API を使用します。

```
from sagemaker.feature_store.feature_processor import list_pipelines, describe

feature_processor_pipelines = list_pipelines()

pipeline_description = describe(
    pipeline_name = feature_processor_pipelines[0]
)
```