Auto-processing#
自動処理は、ソースデータテーブルまたはボリューム内とAIパイプライン出力ナレッジベースの埋め込みなどを自動的に同期させるように設計された機能セットです。
主な機能#
完全な同期 挿入、更新、および削除を自動的に処理するため、手動介入なしでナレッジベースの精度を保ちます。
変更検出 新しいまたは変更されたレコードのみを処理し、変更されていないデータの不必要な再処理を回避します。
迅速なターンアラウンド バッチの処理が終了すると、すぐに結果を利用できます。開始する前に完全なソーススキャンを行う必要はありません。
バッチ処理 レコードを同時に処理するバッチにグループ化します。これは、GPUベースの推論タスクに最適です。
自動処理モード#
パイプラインを介してデータが移動する方法を管理するには、3つの主なモードがあります。
Mode |
Description |
Pros |
Cons |
|---|---|---|---|
Live |
Postgresトリガーを使用して、データを変更する同じトランザクション内の変更をすぐに処理します。 |
Transactional guarantee, zero lag. |
Can block/delay the original data modification transaction. |
Background |
Postgresバックグラウンドワーカーを使用して、構成可能な間隔`background_sync_interval`で非同期データを処理します。 |
Does not block user transactions and ideal for huge data sets. |
Results are delayed by the sync interval. |
Disabled |
自動同期はありません。データは`aidb.run_pipeline()`を使用して手動で処理する必要があります。 |
Full control over when resources are used. |
High manual overhead, requires full reprocessing for table sources. |
構成#
自動処理モードは、パイプラインの作成または更新時にauto_processing
パラメーターを介して設定されます。
パイプライン作成時のモードの設定
SELECT aidb.create_pipeline(
name => my_pipeline,
source => my_source_table,
...
auto_processing => Background,
background_sync_interval => 5 minutes
);
既存のパイプラインのモードの変更
SELECT aidb.update_pipeline(
my_pipeline,
auto_processing => Live
);
これらのファンクションとその完全なパラメーターリストの詳細については、 Pipelines API reference を参照してください。
Parameter |
Type |
Description |
|---|---|---|
auto_processing |
aidb.PipelineAutoProcessingMode |
自動処理モード Live、Background、または`Disabled`。 |
background_sync_interval |
interval |
バックグラウンドでの実行間の間隔。 1秒から2日の間である必要があります。 `auto_processing`が`Background`の場合にのみ適用されます。 |