airflow.providers.google.cloud.triggers.vertex_ai
¶
Module Contents¶
Classes¶
Base class for Vertex AI job triggers. |
|
CreateHyperparameterTuningJobTrigger run on the trigger worker to perform create operation. |
|
CreateBatchPredictionJobTrigger run on the trigger worker to perform create operation. |
|
Make async calls to Vertex AI to check the state of a Pipeline Job. |
|
Make async calls to Vertex AI to check the state of a running custom training job. |
|
Make async calls to Vertex AI to check the state of a running custom container training job. |
|
Make async calls to Vertex AI to check the state of a running custom python package training job. |
- class airflow.providers.google.cloud.triggers.vertex_ai.BaseVertexAIJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
Base class for Vertex AI job triggers.
This trigger polls the Vertex AI job and checks its status.
In order to use it properly, you must: - implement the following methods _wait_job(). - override required job_type_verbose_name attribute to provide meaningful message describing your job type. - override required job_serializer_class attribute to provide proto.Message class that will be used to serialize your job with to_dict() class method.
- async run()[source]¶
Run the trigger in an asynchronous context.
The trigger should yield an Event whenever it wants to fire off an event, and return None if it is finished. Single-event triggers should thus yield and then immediately return.
If it yields, it is likely that it will be resumed very quickly, but it may not be (e.g. if the workload is being moved to another triggerer process, or a multi-event trigger was being used for a single-event task defer).
In either case, Trigger classes should assume they will be persisted, and then rely on cleanup() being called when they are no longer needed.
- class airflow.providers.google.cloud.triggers.vertex_ai.CreateHyperparameterTuningJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]¶
Bases:
BaseVertexAIJobTrigger
CreateHyperparameterTuningJobTrigger run on the trigger worker to perform create operation.
- class airflow.providers.google.cloud.triggers.vertex_ai.CreateBatchPredictionJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]¶
Bases:
BaseVertexAIJobTrigger
CreateBatchPredictionJobTrigger run on the trigger worker to perform create operation.
- class airflow.providers.google.cloud.triggers.vertex_ai.RunPipelineJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]¶
Bases:
BaseVertexAIJobTrigger
Make async calls to Vertex AI to check the state of a Pipeline Job.
- class airflow.providers.google.cloud.triggers.vertex_ai.CustomTrainingJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]¶
Bases:
BaseVertexAIJobTrigger
Make async calls to Vertex AI to check the state of a running custom training job.
Return the job when it enters a completed state.
- class airflow.providers.google.cloud.triggers.vertex_ai.CustomContainerTrainingJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]¶
Bases:
BaseVertexAIJobTrigger
Make async calls to Vertex AI to check the state of a running custom container training job.
Return the job when it enters a completed state.
- class airflow.providers.google.cloud.triggers.vertex_ai.CustomPythonPackageTrainingJobTrigger(conn_id, project_id, location, job_id, poll_interval, impersonation_chain=None)[source]¶
Bases:
BaseVertexAIJobTrigger
Make async calls to Vertex AI to check the state of a running custom python package training job.
Return the job when it enters a completed state.