diff --git a/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py b/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py index 26d3425368288..12c480a28d34c 100644 --- a/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +++ b/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py @@ -44,6 +44,7 @@ optimizationObjective """ +import warnings from typing import Dict, List, Optional, Sequence, Tuple, Union from google.api_core.client_options import ClientOptions @@ -444,6 +445,13 @@ def create_auto_ml_tabular_training_job( concurrent Future and any downstream object will be immediately returned and synced when the Future has completed. """ + if column_transformations: + warnings.warn( + "Consider using column_specs as column_transformations will be deprecated eventually.", + DeprecationWarning, + stacklevel=2, + ) + self._job = self.get_auto_ml_tabular_training_job( project=project_id, location=region, @@ -658,6 +666,13 @@ def create_auto_ml_forecasting_training_job( concurrent Future and any downstream object will be immediately returned and synced when the Future has completed. """ + if column_transformations: + warnings.warn( + "Consider using column_specs as column_transformations will be deprecated eventually.", + DeprecationWarning, + stacklevel=2, + ) + self._job = self.get_auto_ml_forecasting_training_job( project=project_id, location=region,