0

Running this example on ML engine using Cloud composer but am receiving the following error:

AttributeError: 'module' object has no attribute 'estimator'

Even though I am importing import tensorflow as tf and it exits on the following line:

  estimator = tf.estimator.Estimator(model_fn = image_classifier,

Runtime version is 1.8 similar to the version using the repo.

t3 = MLEngineTrainingOperator(
    task_id='ml_engine_training_op',
    project_id=PROJECT_ID,
    job_id=job_id,
    package_uris=["gs://us-central1-ml/trainer-0.1.tar.gz"],
    training_python_module=MODULE_NAME,
    training_args=training_args,
    region=REGION,
    scale_tier='BASIC_GPU',
    runtimeVersion = '1.8',
    dag=dag
)
JY2k
  • 2,879
  • 1
  • 31
  • 60

1 Answers1

0

Please check the setup.py, make sure you put tensorflow in it as REQUIRED_PACKAGES = ['tensorflow==1.8.0']. or some other version. Then don't forget to re-generate tar and upload.

Also, in my case, MLEngineTrainingOperator doesn't seem to pick runtime_version or python_version at all into ML Engine.

alex Lai
  • 66
  • 4