8.構成リファレンス
カーティケヤン ナガリンガム、NetApp
構成リファレンスでは、データ取り込み、データ準備、XCP モビリティ、トレーニング、チェックポイント、およびアーカイブを制御するランタイムパラメータについて説明します。ONTAP NAS バケットは、主にサポート性と移植性を確保するための準備済みデータおよび XCP ステージングレイヤーとして使用されます。リアルタイムの実運用においては、ワークロードやレイテンシの要件により適している場合は、同じ準備済みデータを RDMA 対応の直接アクセスパスを通して利用することも可能です。
すべてのランタイム動作は `dag_run.conf`によって提供されます。これにより、同じDAGが、異なるソースシステム、変換エンジン、ストレージの保存先、リカバリポリシー、およびアーカイブスコープに対応できるようになります。選択したワークフローに必要なパラメータグループのみを設定し、認証情報はAirflow Connectionsまたはシークレットバックエンドに保管し、サンプルは認証情報の値としてではなく、非本番環境用のテンプレートとして使用してください。
[[8-1-ingestion-parameters]]
== 8.1 取り込みパラメータ
アップストリームのインジェスト メカニズムを選択および設定するには、これらの設定を使用します。 `s3_direct`は、データ準備グループで設定されたStorageGRIDの生データ オブジェクトを使用します。AirbyteおよびNiFiの設定は、それぞれのインジェスト ツールが選択されている場合にのみ必要です。
| パラメータ | デフォルト | 必須 | 説明 | 例 |
|---|---|---|---|---|
|
|
いいえ |
取り込みモードを選択します |
|
|
None |
Airbyteのみ |
Airbyte APIエンドポイント |
|
|
None |
Airbyteのみ |
Airbyte接続ID |
|
|
None |
オプション |
ベアラートークン |
|
|
|
いいえ |
Airbyteタイムアウト |
|
|
None |
NiFiのみ |
NiFi API エンドポイント |
|
|
None |
NiFiのみ |
NiFiプロセスグループ |
|
|
|
いいえ |
NiFiタイムアウト |
|
[[8-2-data-preparation-parameters]]
== 8.2 データ準備パラメータ
これらの設定は、生データへのアクセス、準備済みデータの出力、入力データの検出、および変換動作を制御します。 `s3_raw_*`パラメータは StorageGRID を参照し、コード互換の `s3_formatted_*`パラメータは、準備済みで実行スタンプ付きのデータとマニフェストが書き込まれる ONTAP NAS バケットを識別します。
生データStorageGRID / 準備済みデータONTAP NASバケット:
StorageGRID と ONTAP NAS バケットが異なる S3 互換サービスまたはアクセスポリシーを使用する場合は、エンドポイントと認証情報を個別に設定してください。汎用フォールバックキーは、より具体的な生データまたは準備済みデータの設定が存在しない場合にのみ適用されます。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
|
StorageGRID 生の入力バケット |
|
|
|
StorageGRID 生データプレフィックス |
|
|
フォールバックチェーン |
StorageGRID S3エンドポイント |
|
|
フォールバックチェーン |
生のアクセスキー |
|
|
フォールバックチェーン |
シークレットアクセスキー |
|
|
|
Rawリージョン |
|
|
|
ONTAP NAS 準備済みデータ出力バケット |
|
|
|
ONTAP NAS 準備済みデータプレフィックス |
|
|
フォールバックチェーン |
ONTAP NAS バケット S3 エンドポイント |
|
|
フォールバックチェーン |
ONTAP NAS バケットアクセスキー |
|
|
フォールバックチェーン |
ONTAP NAS バケットの秘密鍵 |
|
一般的な代替手段: s3_endpoint_url、 s3_access_key_id、 s3_secret_access_key、 s3_session_token、 s3_verify、 aws_region、 aws_access_key_id、 aws_secret_access_key、 aws_session_token。
入力選択:
既知のCSV入力を処理するには、明示的なオブジェクトキー設定を使用します。そうでない場合、タスクは設定されたStorageGRIDのrawプレフィックスの下にある対象の表形式オブジェクトを検出します。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
自動検出 |
CSVキーの明示的なリスト |
|
|
None |
単一の明示的なCSVキー |
|
変換:
軽量なローカル準備にはPythonパスを、分散準備にはSparkを選択してください。サンプリングとシードは、生成されたトレーニング、検証、推論の分割データに再現性よく適用されます。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
|
|
|
|
|
フォールバックではなく失敗する |
|
|
|
|
|
|
|
フォーマットが利用できない場合は失敗します |
|
|
すべての行 |
行数制限(≤0 = すべて) |
|
|
|
再現可能なシャッフルシード |
|
Spark:
これらの設定は、 `transformation_engine=spark`にのみ適用されます。これらは、Sparkプロセスの配置、リソース割り当て、時間制限、およびオプションのDelta LakeまたはIcebergランタイムの依存関係を制御します。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
|
Sparkバイナリ |
|
|
|
Sparkマスター |
|
|
|
ドライバメモリ |
|
|
|
エグゼキュータメモリ |
|
|
|
タイムアウト(0 = 無効) |
|
|
Delta 3.2.0 |
Deltaランタイムパッケージ |
|
|
Iceberg 1.5.2 |
Icebergランタイムパッケージ |
|
|
|
Iceberg カタログ名 |
|
[[8-3-xcp-and-training-destination-parameters]]
== 8.3 XCP とトレーニング先パラメータ
このグループは、 enable_xcp=true ONTAP NAS NFSソースを検証し、XCPホストを起動して、アクティブなトレーニング パスを選択する際に使用します。 `xcp_copy_destination`は制御スイッチです。以下のONTAP S3固有またはLustreFS固有の設定を選択し、下流のモデルステージでも同じ選択されたティアが使用されます。
| パラメータ | デフォルト | 必須 | 説明 | 例 |
|---|---|---|---|---|
|
|
XCPの場合はい |
XCPブランチを有効にする |
|
|
|
いいえ |
|
|
|
|
XCP preflight |
NFSサーバIP |
|
|
|
XCP preflight |
NFSエクスポートパス |
|
|
|
いいえ |
XCPホストのSSHユーザー |
|
|
|
いいえ |
XCPホストアドレス |
|
S3宛先( `xcp_copy_destination=s3`の場合に必要):
これらの設定は、ONTAP S3 トレーニング パスにのみ指定してください。プロファイルまたは直接認証情報により、XCP およびモデルアーティファクト同期ロジックが、選択した ONTAP S3 バケットとプレフィックスにアクセスできます。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
default |
XCP S3エンドポイント |
|
|
None |
XCP宛先バケット |
|
|
|
宛先プレフィックス |
|
|
|
トレーニング ディスカバリ プレフィックス |
|
|
|
名前付き資格情報プロファイル |
|
|
None |
プロファイルマップ |
|
|
None |
ダイレクトキーフォールバック |
|
|
None |
ダイレクトシークレットフォールバック |
|
|
|
XCP S3 リージョン |
|
LustreFS 宛先 ( `xcp_copy_destination=lustrefs`の場合は必須):
これらの設定は LustreFS トレーニング パスにのみ指定してください。ソースとデスティネーションは、XCP ホスト上にマウントされ、アクセス可能である必要があります。また、デスティネーションは、モデルステージを実行する Airflow ワーカーからもアクセス可能である必要があります。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
|
XCP コピーソース |
|
|
|
LustreFS マウント先 |
|
|
|
マウント配下のトレーニング サブディレクトリ |
|
|
|
XCP ジョブ識別子 |
|
テキストソースの動作:
これらのオプションは、XCP の移動後に3つのテキストデータセットがどのように検出されるかを制御します。明示的なキーは検出を上書きします。ローカルフォールバックを無効にすると、テキスト入力が選択された XCP 宛先から送信されることを必須にできます。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
|
ローカルテキストのフォールバックを許可する |
|
|
Auto |
明示的なベーステキストの位置 |
|
|
Auto |
明示的な微調整テキストの位置 |
|
|
Auto |
明示的な推論テキストの位置 |
|
[[8-4-model-training-parameters]]
== 8.4 モデル学習パラメータ
これらの設定により、ローカルまたはXCP経由で配信されるデータソースが選択され、トレーニング量が制限され、再現可能なデータ順序が維持されます。XCPが有効になっている場合、トレーニングは選択されたONTAP S3またはLustreFS層を読み取り、ベースラインアーティファクトを同じ宛先に公開します。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
|
XCPまたはローカルソースを選択します |
|
|
|
ソース階層を選択します |
|
|
すべての行 |
トレーニング サンプルの制限 |
|
|
|
再現可能なシャッフル |
|
生成物: regression_model.bin、 text_vectorizer.bin、 text_classifier.bin、 train_metrics.json。
[[8-5-fine-tuning-parameters]]
== 8.5 パラメータの微調整
微調整では、選択された XCP 宛先からベースラインとなるテキスト成果物を具体化し、微調整データセットに増分学習を適用し、調整済みの分類器とその評価指標を再公開します。成果物の出所を維持するため、XCP 設定をモデルトレーニングと一貫性のあるものに保ってください。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
|
成果物の具体化/公開を有効にする |
|
|
|
成果物のソース/宛先を選択します |
|
消費: text_vectorizer.bin、 text_classifier.bin、 text_finetune.json。生成: text_classifier_tuned.bin、 fine_tune_metrics.json。
[[8-6-inference-parameters]]
== 8.6 推論パラメータ
これらのフラグは、選択されたトレーニング層から調整済みモデルが具体化された後のスコアリングの範囲を制御します。検証またはビジネス要件により、デフォルトの推論分割と推論テキスト入力を超える出力が必要な場合は、いずれかのオプションを有効にしてください。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
|
スコア トレーニング/検証/推論分割 |
|
|
|
スコアベース/微調整/テキスト推論 |
|
消費: regression_model.bin、 text_vectorizer.bin、 text_classifier_tuned.bin。生成: tabular_predictions.csv、 text_predictions.json。
[[8-7-checkpoint-parameters]]
== 8.7 チェックポイントパラメータ
チェックポイントの範囲は `model_training`です。これらの設定により、トレーニング完了記録を作成するかどうか、どこに保存するか、アップロードの失敗をどのように処理するか、そして後続の実行で有効な完了済みトレーニング結果を検証するか再利用するかが決まります。
| パラメータ | デフォルト | 説明 | 例 |
|---|---|---|---|
|
|
チェックポイントファイルの作成を有効にします |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
後方互換性のあるエイリアス |
|
[[8-8-manual-archive-parameters]]
== 8.8 手動アーカイブパラメータ
このグループを使用して StorageGRID アーカイブを有効化し、保存先のバケットと認証情報を指定して、アーカイブポイントを選択します。選択された `manual_archive_stage`は、アーカイブのタイミングと、アーカイブにベースラインのトレーニング成果物のみを含めるか、完全な推論結果セットを含めるかを制御します。
| パラメータ | デフォルト | 必須 | 説明 | 例 |
|---|---|---|---|---|
|
|
いいえ |
アーカイブ機能を有効にする |
|
|
|
いいえ |
アーカイブポイントとアーティファクトセット: |
|
|
|
はい、有効にした場合 |
アーカイブバケット |
|
|
|
いいえ |
アーカイブ接頭辞 |
|
|
default |
カスタムのみ |
アーカイブS3エンドポイント |
|
|
|
推奨 |
資格情報プロファイル |
|
|
None |
オプション |
プロファイルマップ |
|
|
|
いいえ |
アーカイブにXCP入力を含める |
|
|
|
いいえ |
アップロード後にローカルのrawフォルダを削除する |
|
別名: `fabricpool_archive_*`すべての `manual_archive_*`パラメータ。
[[8-8-1-manual-archive-stage-decision]]
=== 8.8.1 手動アーカイブ段階の決定
この `route_manual_archive_stage`ブランチタスクは、DAG実行ごとに1回 `manual_archive_stage`を読み取ります。選択した値によって、アーカイブの実行タイミングと、StorageGRID アーカイブバケットにアップロードされるアーティファクトの両方が決まります。アーカイブオブジェクトは `s3://<manual_archive_bucket>/<manual_archive_prefix>/<stage>/<run_stamp>/`に保存されます。
manual_archive_stage 値 |
アーカイブのタイミング | アーティファクトがアーカイブされました | 推奨される使用方法 |
|---|---|---|---|
|
直後 |
|
再現可能なベースラインモデルの保存、アーカイブボリュームの最小化、または後続のステージの前のチェックポイントの保持を行います |
|
`fine_tuning`と `inferencing`が完了したら |
すべての |
モデル実行に関する完全なビジネス成果と予測証拠を保持する |
どちらの選択肢でも、 `manual_archive_include_xcp_inputs=true`を設定して、ローカルで具体化されたXCPトレーニング入力が存在する場合にそれを追加します。 `manual_archive_enabled=false`を設定して、トレーニングと推論のワークフローを変更せずにアーカイブタスクをスキップします。
[[8-9-complete-sample-configuration]]
== 8.9 完全なサンプル構成
このカタログは、主要なデプロイメントパスとテストパスのためのベースライン構成を提供します。すべての例では、生データは StorageGRID に保存され、準備済みデータは ONTAP NAS バケットに書き込まれることを前提としています。バケット名、エンドポイントアドレス、ファイルシステムパス、プロファイル名を、対象環境の値に置き換えてください。本番環境のアクセスキーやシークレットは `CONF_JSON`に記述せず、Airflow Connections、Variables、またはシークレットバックエンドを通じて設定してください。
[[8-9-1-xcp-to-lustrefs-with-spark-and-delta-lake]]
=== 8.9.1 XCP から LustreFS への Spark および Delta Lake を使用した移行
分散準備とハイパフォーマンスLustreFS モデルI/Oには、このフルスループットの例を使用してください。対象となるすべての表形式ファイルを `s3_raw_prefix`以下で処理し、準備中にDeltaテーブルを書き込み、トレーニングチェックポイントをONTAP NASの準備済みデータバケットに永続化し、推論結果セット全体をアーカイブします。
{
"ingestion_tool": "s3_direct",
"s3_raw_bucket": "bucket1",
"s3_raw_prefix": "example_ai_pipeline/raw",
"s3_formatted_bucket": "prepnasbucket",
"s3_formatted_prefix": "example_ai_pipeline/formatted",
"enable_xcp": true,
"xcp_copy_destination": "lustrefs",
"xcp_nfs_source_ip": "10.63.150.159",
"xcp_nfs_source_path": "/prepnasbucket/example_ai_pipeline",
"xcp_lustrefs_source_path": "/prepnasbucket/example_ai_pipeline",
"xcp_lustrefs_dest_path": "/mnt/lustre/client",
"xcp_lustrefs_training_subpath": "example_ai_pipeline",
"xcp_text_allow_local_fallback": false,
"transformation_engine": "spark",
"spark_required": true,
"table_format": "delta",
"table_format_required": true,
"spark_driver_memory": "8g",
"spark_executor_memory": "8g",
"spark_timeout_secs": 0,
"sample_count": 14400,
"seed": 11,
"infer_all_splits": true,
"infer_all_text": true,
"checkpoint_enabled": true,
"checkpoint_store": "formatted_s3",
"training_checkpoint_reuse_mode": "off",
"manual_archive_enabled": true,
"manual_archive_stage": "inferencing",
"manual_archive_bucket": "archivalbucket",
"manual_archive_prefix": "ai-models",
"manual_archive_profile": "sgdlocal",
"manual_archive_cleanup_raw": true
}
[[8-9-2-no-xcp-with-python-preparation]]
=== 8.9.2 Python準備なしのXCP
このベースライン構成を軽量な機能的実行に使用します。準備段階ではローカルの Python エンジンが使用され、下流段階ではパイプラインのローカルの準備済みデータおよびアーティファクトパスが使用されます。XCP、Spark、テーブル形式、チェックポイントの再利用、およびアーカイブは無効になっています。
{
"ingestion_tool": "s3_direct",
"s3_raw_bucket": "bucket1",
"s3_raw_prefix": "example_ai_pipeline/raw",
"s3_formatted_bucket": "prepnasbucket",
"s3_formatted_prefix": "example_ai_pipeline/formatted",
"enable_xcp": false,
"transformation_engine": "python",
"table_format": "none",
"sample_count": 200,
"seed": 11,
"checkpoint_enabled": false,
"manual_archive_enabled": false
}
[[8-9-3-python-preparation-with-two-explicit-input-files]]
=== 8.9.3 2つの明示的な入力ファイルを使用したPythonの準備
既知の2つの StorageGRID CSV オブジェクトに対してパイプラインを検証する際には、この集中的なテストを使用してください。 `s3_tabular_object_keys`表形式ファイルの自動検出を無効にします。テキスト入力は引き続き、生データプレフィックスの下の想定される場所を使用します。
{
"ingestion_tool": "s3_direct",
"s3_raw_bucket": "bucket1",
"s3_raw_prefix": "example_ai_pipeline/raw",
"s3_tabular_object_keys": [
"example_ai_pipeline/raw/tabular_part_01.csv",
"example_ai_pipeline/raw/tabular_part_02.csv"
],
"s3_formatted_bucket": "prepnasbucket",
"s3_formatted_prefix": "example_ai_pipeline/formatted",
"enable_xcp": false,
"transformation_engine": "python",
"table_format": "none",
"sample_count": 200,
"seed": 11,
"manual_archive_enabled": false
}
[[8-9-4-python-preparation-with-automatic-all-file-discovery]]
=== 8.9.4 Pythonによる全ファイル自動検出の準備
`s3++_++tabular++_++object++_++keys`と `s3++_++tabular++_++object++_++key`を省略すると、StorageGRID 生データプレフィックス配下の対象となるすべての表形式オブジェクトが処理されます。この例は、Python 準備エンジンを使用した全ファイル対象の機能テストまたはスケールテストに適しています。
{
"s3_raw_bucket": "bucket1",
"s3_raw_prefix": "example_ai_pipeline/raw",
"s3_formatted_bucket": "prepnasbucket",
"s3_formatted_prefix": "example_ai_pipeline/formatted",
"enable_xcp": false,
"transformation_engine": "python",
"table_format": "none",
"sample_count": 0,
"seed": 11,
"manual_archive_enabled": false
}
`sample_count: 0`これは、データ準備において利用可能なすべての行が使用されることを意味します。制限付きテスト実行の場合は、正の値を設定します。
[[8-9-5-xcp-to-ontap-s3-with-python-preparation]]
=== 8.9.5 XCP から ONTAP S3 への Python を使用した移行の準備
準備済みデータを ONTAP NAS NFS エクスポートから ONTAP S3 トレーニングバケットにコピーする必要がある場合は、この構成を使用してください。モデルのトレーニング、ファインチューニング、および推論は、同じ ONTAP S3 宛先を通じて成果物を具体化し、公開します。
{
"s3_raw_bucket": "bucket1",
"s3_raw_prefix": "example_ai_pipeline/raw",
"s3_formatted_bucket": "prepnasbucket",
"s3_formatted_prefix": "example_ai_pipeline/formatted",
"enable_xcp": true,
"xcp_copy_destination": "s3",
"xcp_nfs_source_ip": "10.63.150.159",
"xcp_nfs_source_path": "/prepnasbucket/example_ai_pipeline",
"xcp_s3_endpoint": "https://ontap-s3.example.com",
"xcp_s3_bucket": "trainingbucket",
"xcp_s3_dest_prefix": "example_ai_pipeline",
"xcp_s3_training_prefix": "example_ai_pipeline",
"xcp_s3_profile": "ontaps3",
"transformation_engine": "python",
"table_format": "none",
"sample_count": 14400,
"seed": 11,
"checkpoint_enabled": true,
"checkpoint_store": "formatted_s3",
"manual_archive_enabled": true,
"manual_archive_stage": "model_training",
"manual_archive_bucket": "archivalbucket",
"manual_archive_profile": "storagegrid-archive"
}
[[8-9-6-xcp-to-ontap-s3-with-spark-and-iceberg]]
=== 8.9.6 XCP から ONTAP S3(Spark および Iceberg 使用)
Iceberg テーブル出力と ONTAP S3 をアクティブなトレーニング先として使用した分散準備には、この構成を使用します。Spark または Iceberg が利用できない場合に、フォールバックするのではなく実行を失敗させる必要があるときは、 `spark_required`および `table_format_required`を `true`に設定してください。
{
"s3_raw_bucket": "bucket1",
"s3_raw_prefix": "example_ai_pipeline/raw",
"s3_formatted_bucket": "prepnasbucket",
"s3_formatted_prefix": "example_ai_pipeline/formatted",
"enable_xcp": true,
"xcp_copy_destination": "s3",
"xcp_nfs_source_ip": "10.63.150.159",
"xcp_nfs_source_path": "/prepnasbucket/example_ai_pipeline",
"xcp_s3_bucket": "trainingbucket",
"xcp_s3_dest_prefix": "example_ai_pipeline",
"xcp_s3_profile": "ontaps3",
"transformation_engine": "spark",
"spark_required": true,
"table_format": "iceberg",
"table_format_required": true,
"spark_driver_memory": "8g",
"spark_executor_memory": "8g",
"spark_timeout_secs": 0,
"sample_count": 0,
"seed": 11,
"manual_archive_enabled": true,
"manual_archive_stage": "inferencing",
"manual_archive_bucket": "archivalbucket",
"manual_archive_profile": "storagegrid-archive"
}
[[8-9-7-scenario-selection-summary]]
=== 8.9.7 シナリオ選択の概要
| シナリオ | XCP宛先 | 準備エンジン | 表形式 | 入力範囲 | アーカイブ段階 |
|---|---|---|---|---|---|
8.9.1 |
LustreFS |
スパーク |
Delta |
検出されたすべてのファイル |
|
8.9.2 |
None |
Python |
None |
検出されたすべてのファイル |
Disabled |
8.9.3 |
None |
Python |
None |
2つの明示的なファイル |
Disabled |
8.9.4 |
None |
Python |
None |
検出されたすべてのファイル |
Disabled |
8.9.5 |
ONTAP S3 |
Python |
None |
検出されたすべてのファイル |
|
8.9.6 |
ONTAP S3 |
スパーク |
Iceberg |
検出されたすべてのファイル |
|
[[8-9-8-execution-walkthroughs]]
=== 8.9.8 実行手順の解説
Airflowワークスペースからサンプルを実行してください。トリガースクリプトは一意の `manual__<UTC timestamp>`実行IDを生成し、完了を待機し、実行が失敗またはタイムアウトした場合はゼロ以外の終了コードを返します。以下の完全な構成では、操作例と同じ `CONF_JSON="$(python3 - <<'PY' …)"`パターンを使用します。参照されているAirflow管理接続、XCPプロファイル、およびアーカイブプロファイルをシークレットバックエンドで構成してから実行し、 `CONF_JSON`は非機密のバケット、エンドポイント、パス、およびプロファイル識別子に限定してください。
有効なテーブル形式名は `iceberg`です。 `icerberg`は使用しないでください。これはサポートされていない値です。
すべてのファイル、Spark、Iceberg、XCP から ONTAP S3、準備済みデータ S3 へのチェックポイント、推論後のアーカイブ:
CONF_JSON="$(python3 - <<'PY'
import json
print(json.dumps({
"ingestion_tool": "s3_direct",
"enable_xcp": True,
"xcp_copy_destination": "s3",
"xcp_text_allow_local_fallback": True,
"s3_raw_bucket": "bucket1",
"s3_raw_prefix": "example_ai_pipeline/raw",
"s3_raw_endpoint_url": "https://storagegrid.example.com",
"s3_raw_region": "us-east-1",
"s3_formatted_bucket": "prepnasbucket",
"s3_formatted_prefix": "example_ai_pipeline/formatted",
"s3_formatted_endpoint_url": "https://ontap-nas.example.com",
"s3_formatted_region": "us-east-1",
"xcp_nfs_source_ip": "10.63.150.159",
"xcp_nfs_source_path": "/prepnasbucket/example_ai_pipeline",
"xcp_s3_endpoint": "https://ontap-s3.example.com",
"xcp_s3_bucket": "trainingbucket",
"xcp_s3_dest_prefix": "example_ai_pipeline",
"xcp_s3_training_prefix": "example_ai_pipeline",
"xcp_s3_profile": "ontaps3",
"transformation_engine": "spark",
"spark_required": True,
"table_format": "iceberg",
"table_format_required": True,
"sample_count": 0,
"seed": 11,
"spark_driver_memory": "8g",
"spark_executor_memory": "8g",
"spark_timeout_secs": 0,
"infer_all_splits": True,
"infer_all_text": True,
"checkpoint_enabled": True,
"checkpoint_store": "formatted_s3",
"manual_archive_enabled": True,
"manual_archive_stage": "inferencing",
"manual_archive_bucket": "archivalbucket",
"manual_archive_prefix": "ai-models",
"manual_archive_profile": "sgdlocal",
"manual_archive_endpoint": "https://storagegrid.example.com",
"manual_archive_cleanup_raw": True,
"manual_archive_include_xcp_inputs": True,
}, separators=(",", ":")))
PY
)"
CONF_JSON="$CONF_JSON" AIRFLOW_BIN=./.venv/bin/airflow INGESTION_TOOL=s3_direct \
./trigger_and_wait_ai_pipeline_sklearn.sh
すべてのファイル、Spark、Iceberg、XCPからLustreFSへの転送、準備済みデータS3へのチェックポイント作成、推論後のアーカイブ:
CONF_JSON="$(python3 - <<'PY'
import json
print(json.dumps({
"ingestion_tool": "s3_direct",
"enable_xcp": True,
"xcp_copy_destination": "lustrefs",
"ssh_user": "root",
"ssh_host": "10.63.150.178",
"xcp_text_allow_local_fallback": True,
"s3_raw_bucket": "bucket1",
"s3_raw_prefix": "example_ai_pipeline/raw",
"s3_raw_endpoint_url": "https://storagegrid.example.com",
"s3_raw_region": "us-east-1",
"s3_formatted_bucket": "prepnasbucket",
"s3_formatted_prefix": "example_ai_pipeline/formatted",
"s3_formatted_endpoint_url": "https://ontap-nas.example.com",
"s3_formatted_region": "us-east-1",
"xcp_nfs_source_ip": "10.63.150.159",
"xcp_nfs_source_path": "/prepnasbucket/example_ai_pipeline",
"xcp_lustrefs_source_path": "/prepnasbucket/example_ai_pipeline",
"xcp_lustrefs_dest_path": "/mnt/lustre/client",
"xcp_lustrefs_training_subpath": "example_ai_pipeline",
"transformation_engine": "spark",
"spark_required": True,
"table_format": "iceberg",
"table_format_required": True,
"sample_count": 0,
"seed": 11,
"spark_driver_memory": "8g",
"spark_executor_memory": "8g",
"spark_timeout_secs": 0,
"infer_all_splits": True,
"infer_all_text": True,
"checkpoint_enabled": True,
"checkpoint_store": "formatted_s3",
"manual_archive_enabled": True,
"manual_archive_stage": "inferencing",
"manual_archive_bucket": "archivalbucket",
"manual_archive_prefix": "ai-models",
"manual_archive_profile": "sgdlocal",
"manual_archive_endpoint": "https://storagegrid.example.com",
"manual_archive_cleanup_raw": True,
"manual_archive_include_xcp_inputs": True,
}, separators=(",", ":")))
PY
)"
AIRFLOW_BIN=./.venv/bin/airflow INGESTION_TOOL=s3_direct \
./trigger_and_wait_ai_pipeline_sklearn.sh
ONTAP S3 モードの場合は、非機密情報の `xcp_s3_profile`名前のみを `CONF_JSON`に渡し、実行前に XCP ホスト上またはAirflow が管理するシークレットストレージを通じて、対応する認証情報を定義してください。LustreFS モードの場合、トレーニングルートが ONTAP S3 の認証情報を解決しないため、 `xcp_s3_profiles`マップは意図的に省略されています。どちらの例でも、StorageGRID の生データ、ONTAP NAS の準備済みデータ、およびアーカイブの認証情報は、インライン JSON ではなく Airflow が管理するシークレットストレージを通じて定義してください。 `s3_tabular_object_keys`を省略し、 `sample_count`を `0`に設定することで、対象となるすべての表形式ファイルの自動検出と、利用可能なすべての行の使用が要求されます。
Python、XCP なし、2 ファイルテスト:
CONF_JSON='{"s3_raw_bucket":"bucket1","s3_raw_prefix":"example_ai_pipeline/raw","s3_tabular_object_keys":["example_ai_pipeline/raw/tabular_part_01.csv","example_ai_pipeline/raw/tabular_part_02.csv"],"s3_formatted_bucket":"prepnasbucket","s3_formatted_prefix":"example_ai_pipeline/formatted","enable_xcp":false,"transformation_engine":"python","table_format":"none","sample_count":200,"manual_archive_enabled":false}' \
./trigger_and_wait_ai_pipeline_sklearn.sh
Spark、Delta Lake、XCP から LustreFS へ:
CONF_JSON='{"enable_xcp":true,"xcp_copy_destination":"lustrefs","xcp_nfs_source_ip":"10.63.150.159","xcp_nfs_source_path":"/prepnasbucket/example_ai_pipeline","xcp_lustrefs_source_path":"/prepnasbucket/example_ai_pipeline","xcp_lustrefs_dest_path":"/mnt/lustre/client","xcp_lustrefs_training_subpath":"example_ai_pipeline","transformation_engine":"spark","spark_required":true,"table_format":"delta","table_format_required":true,"sample_count":14400,"manual_archive_enabled":true,"manual_archive_stage":"inferencing"}' \
./trigger_and_wait_ai_pipeline_sklearn.sh
Spark、Iceberg、XCP から ONTAP S3:
CONF_JSON='{"enable_xcp":true,"xcp_copy_destination":"s3","xcp_nfs_source_ip":"10.63.150.159","xcp_nfs_source_path":"/prepnasbucket/example_ai_pipeline","xcp_s3_bucket":"trainingbucket","xcp_s3_dest_prefix":"example_ai_pipeline","xcp_s3_profile":"ontaps3","transformation_engine":"spark","spark_required":true,"table_format":"iceberg","table_format_required":true,"sample_count":0,"manual_archive_enabled":true,"manual_archive_stage":"inferencing"}' \
./trigger_and_wait_ai_pipeline_sklearn.sh
XCP を実行する前に、XCP ホストから設定済みの ONTAP NAS NFS パスおよび宛先へのアクセス可能性を確認してください。正常に実行されたら、選択したエンジン、入力範囲、宛先、およびアーカイブ段階を確認するために、 [data_prep] effective_config、 [xcp_copy] effective_config、 [model_training] effective_config、および `[manual_archive]`のタスクログを確認してください。