0

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

`

JY2k
  • 2,879
  • 1
  • 31
  • 60
  • 4
    https://airflow.readthedocs.io/en/stable/integration.html#cloud-ml-engine ...the name-space might be `airflow.contrib.operators.mlengine_operator` – Martin Zeitler Jan 27 '19 at 06:46

1 Answers1

1

This solved the issue.

from airflow.contrib.operators.mlengine_operator import MLEngineTrainingOperator
JY2k
  • 2,879
  • 1
  • 31
  • 60