airflow.providers.google.cloud.triggers.vertex_ai

BaseVertexAIJobTrigger

Vertex AI 作業觸發器的基類。

CreateHyperparameterTuningJobTrigger

CreateHyperparameterTuningJobTrigger 在觸發器 worker 上執行以執行建立操作。

CreateBatchPredictionJobTrigger

CreateBatchPredictionJobTrigger 在觸發器 worker 上執行以執行建立操作。

RunPipelineJobTrigger

對 Vertex AI 進行非同步呼叫以檢查 Pipeline 作業的狀態。

CustomTrainingJobTrigger

對 Vertex AI 進行非同步呼叫以檢查正在執行的自定義訓練作業的狀態。

CustomContainerTrainingJobTrigger

對 Vertex AI 進行非同步呼叫以檢查正在執行的自定義容器訓練作業的狀態。

CustomPythonPackageTrainingJobTrigger

對 Vertex AI 進行非同步呼叫以檢查正在執行的自定義 Python 包訓練作業的狀態。

模組內容

class airflow.providers.google.cloud.triggers.vertex_ai.BaseVertexAIJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]

基類:airflow.triggers.base.BaseTrigger

Vertex AI 作業觸發器的基類。

此觸發器輪詢 Vertex AI 作業並檢查其狀態。

為了正確使用它,您必須: - 實現以下方法 _wait_job()。 - 覆蓋所需的 job_type_verbose_name 屬性以提供描述您的作業型別的有意義訊息。 - 覆蓋所需的 job_serializer_class 屬性以提供將用於透過 to_dict() 類方法序列化您的作業的 proto.Message 類。

job_type_verbose_name: str = 'Vertex AI Job'[source]
job_serializer_class: proto.Message = None[source]
statuses_success[source]
conn_id[source]
project_id[source]
location[source]
job_id[source]
poll_interval[source]
impersonation_chain = None[source]
trigger_class_path = 'airflow.providers.google.cloud.triggers.vertex_ai.BaseVertexAIJobTrigger'[source]
serialize()[source]

返回重建此觸發器所需的資訊。

返回

(類路徑,重新例項化所需的關鍵字引數)的元組。

返回型別

tuple[str, dict[str, Any]]

async run()[source]

在非同步上下文中執行觸發器。

觸發器應在需要觸發事件時生成事件,並在完成時返回 None。因此,單事件觸發器應先生成然後立即返回。

如果它生成,很可能會非常快地恢復,但並非一定(例如,如果工作負載正在移動到另一個觸發器程序,或者多事件觸發器用於單事件任務延遲)。

無論哪種情況,Trigger 類都應假定它們將被持久化,並在不再需要時依賴於呼叫 cleanup() 進行清理。

class airflow.providers.google.cloud.triggers.vertex_ai.CreateHyperparameterTuningJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]

基類:BaseVertexAIJobTrigger

CreateHyperparameterTuningJobTrigger 在觸發器 worker 上執行以執行建立操作。

job_type_verbose_name = 'Hyperparameter Tuning Job'[source]
job_serializer_class[source]
property async_hook: airflow.providers.google.cloud.hooks.vertex_ai.hyperparameter_tuning_job.HyperparameterTuningJobAsyncHook[source]
class airflow.providers.google.cloud.triggers.vertex_ai.CreateBatchPredictionJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]

基類:BaseVertexAIJobTrigger

CreateBatchPredictionJobTrigger 在觸發器 worker 上執行以執行建立操作。

job_type_verbose_name = 'Batch Prediction Job'[source]
job_serializer_class[source]
property async_hook: airflow.providers.google.cloud.hooks.vertex_ai.batch_prediction_job.BatchPredictionJobAsyncHook[source]
class airflow.providers.google.cloud.triggers.vertex_ai.RunPipelineJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]

基類:BaseVertexAIJobTrigger

對 Vertex AI 進行非同步呼叫以檢查 Pipeline 作業的狀態。

job_type_verbose_name = 'Pipeline Job'[source]
job_serializer_class[source]
statuses_success[source]
property async_hook: airflow.providers.google.cloud.hooks.vertex_ai.pipeline_job.PipelineJobAsyncHook[source]
class airflow.providers.google.cloud.triggers.vertex_ai.CustomTrainingJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]

基類:BaseVertexAIJobTrigger

對 Vertex AI 進行非同步呼叫以檢查正在執行的自定義訓練作業的狀態。

作業進入完成狀態時返回該作業。

job_type_verbose_name = 'Custom Training Job'[source]
job_serializer_class[source]
statuses_success[source]
property async_hook: airflow.providers.google.cloud.hooks.vertex_ai.custom_job.CustomJobAsyncHook[source]
class airflow.providers.google.cloud.triggers.vertex_ai.CustomContainerTrainingJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]

基類:BaseVertexAIJobTrigger

對 Vertex AI 進行非同步呼叫以檢查正在執行的自定義容器訓練作業的狀態。

作業進入完成狀態時返回該作業。

job_type_verbose_name = 'Custom Container Training Job'[source]
job_serializer_class[source]
statuses_success[source]
property async_hook: airflow.providers.google.cloud.hooks.vertex_ai.custom_job.CustomJobAsyncHook[source]
class airflow.providers.google.cloud.triggers.vertex_ai.CustomPythonPackageTrainingJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]

基類:BaseVertexAIJobTrigger

對 Vertex AI 進行非同步呼叫以檢查正在執行的自定義 Python 包訓練作業的狀態。

作業進入完成狀態時返回該作業。

job_type_verbose_name = 'Custom Python Package Training Job'[source]
job_serializer_class[source]
statuses_success[source]
property async_hook: airflow.providers.google.cloud.hooks.vertex_ai.custom_job.CustomJobAsyncHook[source]

此條目有幫助嗎?