Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show prominent warning for deprecations in docs #44479

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions docs/apache-airflow-providers-google/operators/cloud/automl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ To create a Google AutoML dataset you can use
:class:`~airflow.providers.google.cloud.operators.automl.AutoMLCreateDatasetOperator`.
The operator returns dataset id in :ref:`XCom <concepts:xcom>` under ``dataset_id`` key.

This operator is deprecated when running for text, video and vision prediction and will be removed soon.
All the functionality of legacy AutoML Natural Language, Vision, Video Intelligence and new features are
available on the Vertex AI platform. Please use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.dataset.CreateDatasetOperator`
.. warning::
This operator is deprecated when running for text, video and vision prediction and will be removed soon.
All the functionality of legacy AutoML Natural Language, Vision, Video Intelligence and new features are
available on the Vertex AI platform. Please use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.dataset.CreateDatasetOperator`

.. exampleinclude:: /../../providers/tests/system/google/cloud/automl/example_automl_dataset.py
:language: python
Expand All @@ -64,10 +65,11 @@ After creating a dataset you can use it to import some data using
To update dataset you can use
:class:`~airflow.providers.google.cloud.operators.automl.AutoMLTablesUpdateDatasetOperator`.

This operator is deprecated when running for text, video and vision prediction and will be removed soon.
All the functionality of legacy AutoML Natural Language, Vision, Video Intelligence and new features are
available on the Vertex AI platform. Please use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.dataset.UpdateDatasetOperator`
.. warning::
This operator is deprecated when running for text, video and vision prediction and will be removed soon.
All the functionality of legacy AutoML Natural Language, Vision, Video Intelligence and new features are
available on the Vertex AI platform. Please use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.dataset.UpdateDatasetOperator`

.. exampleinclude:: /../../providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_dataset.py
:language: python
Expand Down Expand Up @@ -102,14 +104,15 @@ To create a Google AutoML model you can use
The operator will wait for the operation to complete. Additionally the operator
returns the id of model in :ref:`XCom <concepts:xcom>` under ``model_id`` key.

This operator is deprecated when running for text, video and vision prediction and will be removed soon.
All the functionality of legacy AutoML Natural Language, Vision, Video Intelligence and new features are
available on the Vertex AI platform. Please use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.generative_model.SupervisedFineTuningTrainOperator`,
:class:`~airflow.providers.google.cloud.operators.vertex_ai.auto_ml.CreateAutoMLImageTrainingJobOperator` or
:class:`~airflow.providers.google.cloud.operators.vertex_ai.auto_ml.CreateAutoMLVideoTrainingJobOperator`.
.. warning::
This operator is deprecated when running for text, video and vision prediction and will be removed soon.
All the functionality of legacy AutoML Natural Language, Vision, Video Intelligence and new features are
available on the Vertex AI platform. Please use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.generative_model.SupervisedFineTuningTrainOperator`,
:class:`~airflow.providers.google.cloud.operators.vertex_ai.auto_ml.CreateAutoMLImageTrainingJobOperator` or
:class:`~airflow.providers.google.cloud.operators.vertex_ai.auto_ml.CreateAutoMLVideoTrainingJobOperator`.

You can find example on how to use VertexAI operators for AutoML Vision classification here:
You can find example on how to use VertexAI operators for AutoML Vision classification here:

.. exampleinclude:: /../../providers/tests/system/google/cloud/automl/example_automl_vision_classification.py
:language: python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Prerequisite Tasks
Creating a Data Pipeline
^^^^^^^^^^^^^^^^^^^^^^^^

This operator is deprecated. Please use :class:`~airflow.providers.google.cloud.operators.dataflow.DataflowCreatePipelineOperator`.
.. warning::
This operator is deprecated. Please use :class:`~airflow.providers.google.cloud.operators.dataflow.DataflowCreatePipelineOperator`.

To create a new Data Pipelines instance using a request body and parent name, use :class:`~airflow.providers.google.cloud.operators.datapipeline.CreateDataPipelineOperator`.
The operator accesses Google Cloud's Data Pipelines API and calls upon the
Expand All @@ -60,7 +61,8 @@ Here is an example of how you can create a Data Pipelines instance by running th
Running a Data Pipeline
^^^^^^^^^^^^^^^^^^^^^^^

This operator is deprecated. Please use :class:`~airflow.providers.google.cloud.operators.dataflow.DataflowRunPipelineOperator`.
.. warning::
This operator is deprecated. Please use :class:`~airflow.providers.google.cloud.operators.dataflow.DataflowRunPipelineOperator`.

To run a Data Pipelines instance, use :class:`~airflow.providers.google.cloud.operators.datapipeline.RunDataPipelineOperator`.
The operator accesses Google Cloud's Data Pipelines API and calls upon the
Expand Down
77 changes: 43 additions & 34 deletions docs/apache-airflow-providers-google/operators/cloud/mlengine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ This creates a virtual machine that can run code specified in the trainer file,
contains the main application code. A job can be initiated with the
:class:`~airflow.providers.google.cloud.operators.mlengine.MLEngineStartTrainingJobOperator`.

This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.custom_job.CreateCustomPythonPackageTrainingJobOperator`
instead.
.. warning::
This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.custom_job.CreateCustomPythonPackageTrainingJobOperator`
instead.

.. exampleinclude:: /../../providers/tests/system/google/cloud/ml_engine/example_mlengine.py
:language: python
Expand All @@ -64,10 +65,11 @@ A model is a container that can hold multiple model versions. A new model can be
The ``model`` field should be defined with a dictionary containing the information about the model.
``name`` is a required field in this dictionary.

This operator is deprecated. The model is created as a result of running Vertex AI operators that create training jobs
of any types. For example, you can use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.custom_job.CreateCustomPythonPackageTrainingJobOperator`.
The result of running this operator will be ready-to-use model saved in Model Registry.
.. warning::
This operator is deprecated. The model is created as a result of running Vertex AI operators that create training jobs
of any types. For example, you can use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.custom_job.CreateCustomPythonPackageTrainingJobOperator`.
The result of running this operator will be ready-to-use model saved in Model Registry.

.. exampleinclude:: /../../providers/tests/system/google/cloud/ml_engine/example_mlengine.py
:language: python
Expand All @@ -83,9 +85,10 @@ The :class:`~airflow.providers.google.cloud.operators.mlengine.MLEngineGetModelO
can be used to obtain a model previously created. To obtain the correct model, ``model_name``
must be defined in the operator.

This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.model_service.GetModelOperator`
instead.
.. warning::
This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.model_service.GetModelOperator`
instead.

.. exampleinclude:: /../../providers/tests/system/google/cloud/ml_engine/example_mlengine.py
:language: python
Expand Down Expand Up @@ -114,11 +117,12 @@ The model must be specified by ``model_name``, and the ``version`` parameter sho
all the information about the version. Within the ``version`` parameter's dictionary, the ``name`` field is
required.

This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.custom_job.CreateCustomPythonPackageTrainingJobOperator`
instead. In this case, the new version of specific model could be created by specifying existing model id in
``parent_model`` parameter when running Training Job. This will ensure that new version of model will be trained except
of creating new model.
.. warning::
This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.custom_job.CreateCustomPythonPackageTrainingJobOperator`
instead. In this case, the new version of specific model could be created by specifying existing model id in
``parent_model`` parameter when running Training Job. This will ensure that new version of model will be trained except
of creating new model.

.. exampleinclude:: /../../providers/tests/system/google/cloud/ml_engine/example_mlengine.py
:language: python
Expand All @@ -144,12 +148,13 @@ By default, the model code will run using the default model version. You can set
:class:`~airflow.providers.google.cloud.operators.mlengine.MLEngineSetDefaultVersionOperator`
by specifying the ``model_name`` and ``version_name`` parameters.

This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.model_service.SetDefaultVersionOnModelOperator`
instead. The desired model version to be set as default could be passed with the model ID in ``model_id`` parameter
in format ``projects/{project}/locations/{location}/models/{model_id}@{version_id}`` or
``projects/{project}/locations/{location}/models/{model_id}@{version_alias}``. By default, the first model version
created will be marked as default.
.. warning::
This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.model_service.SetDefaultVersionOnModelOperator`
instead. The desired model version to be set as default could be passed with the model ID in ``model_id`` parameter
in format ``projects/{project}/locations/{location}/models/{model_id}@{version_id}`` or
``projects/{project}/locations/{location}/models/{model_id}@{version_alias}``. By default, the first model version
created will be marked as default.

.. exampleinclude:: /../../providers/tests/system/google/cloud/ml_engine/example_mlengine.py
:language: python
Expand All @@ -161,10 +166,11 @@ To list the model versions available, use the
:class:`~airflow.providers.google.cloud.operators.mlengine.MLEngineListVersionsOperator`
while specifying the ``model_name`` parameter.

This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.model_service.ListModelVersionsOperator`
instead. You can pass the name of the desired model in ``model_id`` parameter. If the model ID is passed
with version aliases, the operator will output all the versions available for this model.
.. warning::
This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.model_service.ListModelVersionsOperator`
instead. You can pass the name of the desired model in ``model_id`` parameter. If the model ID is passed
with version aliases, the operator will output all the versions available for this model.

.. exampleinclude:: /../../providers/tests/system/google/cloud/ml_engine/example_mlengine.py
:language: python
Expand All @@ -181,9 +187,10 @@ A Google Cloud AI Platform prediction job can be started with the
For specifying the model origin, you need to provide either the ``model_name``, ``uri``, or ``model_name`` and
``version_name``. If you do not provide the ``version_name``, the operator will use the default model version.

This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.batch_prediction_job.CreateBatchPredictionJobOperator`
instead.
.. warning::
This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.batch_prediction_job.CreateBatchPredictionJobOperator`
instead.

.. exampleinclude:: /../../providers/tests/system/google/cloud/ml_engine/example_mlengine.py
:language: python
Expand All @@ -200,9 +207,10 @@ A model version can be deleted with the
:class:`~airflow.providers.google.cloud.operators.mlengine.MLEngineDeleteVersionOperator` by
the ``version_name`` and ``model_name`` parameters.

This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.model_service.DeleteModelVersionOperator`
instead. The default version could not be deleted on the model.
.. warning::
This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.model_service.DeleteModelVersionOperator`
instead. The default version could not be deleted on the model.

.. exampleinclude:: /../../providers/tests/system/google/cloud/ml_engine/example_mlengine.py
:language: python
Expand All @@ -214,9 +222,10 @@ You can also delete a model with the
:class:`~airflow.providers.google.cloud.operators.mlengine.MLEngineDeleteModelOperator`
by providing the ``model_name`` parameter.

This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.model_service.DeleteModelOperator`
instead.
.. warning::
This operator is deprecated. Please, use
:class:`~airflow.providers.google.cloud.operators.vertex_ai.model_service.DeleteModelOperator`
instead.

.. exampleinclude:: /../../providers/tests/system/google/cloud/ml_engine/example_mlengine.py
:language: python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Once that is done, you can run -
``migrate`` keeps track of migrations already applied, so it's safe to run as often as you need.

.. note::
.. warning::

Prior to Airflow version 2.7.0, ``airflow db upgrade`` was used to apply migrations,
however, it has been deprecated in favor of ``airflow db migrate``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Usually, you need to run ``airflow db migrate`` in order to create the database
or migrate to the latest version if it does. You should make sure that Airflow components are
not running while the database migration is being executed.

.. note::
.. warning::

Prior to Airflow version 2.7.0, ``airflow db upgrade`` was used to apply migrations,
however, it has been deprecated in favor of ``airflow db migrate``.
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow/installation/upgrading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Sample usage for Airflow version 2.7.0 or greater:
``airflow db migrate -s --from-version "2.4.3" -n "2.7.3"``
``airflow db migrate --show-sql-only --from-version "2.4.3" --to-version "2.7.3"``

.. note::
.. warning::
``airflow db upgrade`` has been replaced by ``airflow db migrate`` since Airflow version 2.7.0
and former has been deprecated.

Expand Down
Loading