Reputation: 2909
What is the convention for properly importing a module in Airflow? I would like to import this operator:
https://github.com/apache/airflow/blob/master/airflow/contrib/operators/mlengine_operator.py
using this line:
from airflow.contrib.operators import MLEngineTrainingOperator
I get the following error: `
cannot import name MLEngineTrainingOperator
`
Upvotes: 0
Views: 191
Reputation: 2909
This solved the issue.
from airflow.contrib.operators.mlengine_operator import MLEngineTrainingOperator
Upvotes: 1