[AIRFLOW-5099] Implement Google Cloud AutoML operators#5720
[AIRFLOW-5099] Implement Google Cloud AutoML operators#5720mik-laj merged 8 commits intoapache:masterfrom
Conversation
potiuk
left a comment
There was a problem hiding this comment.
Knowing that most of it automatically generated, it looks good :).
potiuk
left a comment
There was a problem hiding this comment.
Knowing that most of it automatically generated, it looks good :).
lwander
left a comment
There was a problem hiding this comment.
Nice! Looks clean :) Just a few small comments
There was a problem hiding this comment.
Do we need as get_deploy_dag:? It's not referenced in the snippet below unless I've missed something
There was a problem hiding this comment.
It's a common to use as name for DAGs. Usually examples contains only one DAG (as dag).
There was a problem hiding this comment.
Does this mean the model_id must be supplied in this payload? Could it help to update the comment to show the name & format of the required field?
There was a problem hiding this comment.
No, model_id is not a part of payload. The payload is described in AutoML docs and it depends on service type. I assume that user will be familiar / will check the official REST API / Python SDK. I think it could be worth to put there a comment with link to payload definition. @lwander WDYT?
ee0de9e to
25607cc
Compare
|
Still some tests fail :( |
e8dbd30 to
25fe17c
Compare
|
No review comments here, I'm just excited for this to be merged -- thank you all for your work! |
7cfa113 to
0e69d4e
Compare
Adds Google Cloud AutoML operators.
airflow/gcp/example_dags/example_automl_nl_text_classification.py
Outdated
Show resolved
Hide resolved
| ) | ||
|
|
||
| GCP_PROJECT_ID = os.environ.get("GCP_PROJECT_ID", "your-project-id") | ||
| # For now only this location is supported |
There was a problem hiding this comment.
| # For now only this location is supported | |
| # For now only this location is supported |
This comment is not needed. It is better not to add information that may change in the documentation. This is a similar problem as with the prices of services in the documentation. Have you noticed that prices are only in one place and no official documentation contains calculations of service prices? When a price is needed, a reference to the table or calculator is added.
| timeout: float = None, | ||
| metadata: Sequence[Tuple[str, str]] = None, | ||
| retry: Retry = None, | ||
| ) -> Operation: |
There was a problem hiding this comment.
| ) -> Operation: | |
| ) -> Operation: |
I think, hook should wait for the result of the operation. Let's talk about it on Monday.
|
Let's merge. We will not be able to resolve inconsistencies with MessageToDict now. This requires work at the level of all GCP operators. I think that in the near future we will face this problem. |
What generator was used here? |
|
@Ark-kun here is our internal repo with generators for GCP stuff: It still requires some final touches and minimal improvements but it gives a really nice base for developing operators. All suggestions are appreciated ;) |
Adds Google Cloud AutoML operators.
Make sure you have checked all steps below.
Jira
Description
Tests
tests/contrib/hooks/test_gcp_automl_hook.pytests/contrib/operators/test_gcp_automl_operator.pyCommits
Documentation
Code Quality
flake8