【问题标题】:MLengine 'module' object has no attribute 'estimator'MLengine 'module' 对象没有属性 'estimator'
【发布时间】:2019-01-29 00:49:40
【问题描述】:

使用 Cloud Composer 在 ML 引擎上运行 this example,但收到以下错误:

AttributeError: 'module' 对象没有属性 'estimator'

即使我正在导入 import tensorflow as tf 并且它在以下行退出:

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

运行时版本是 1.8,类似于使用 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
)

【问题讨论】:

  • 您能否提供与此错误相关的 CMLE job_id(电子邮件至:cloudml-feedback@google.com)?

标签: tensorflow google-cloud-ml google-cloud-composer


【解决方案1】:

请检查setup.py,确保将 tensorflow 放入其中 REQUIRED_PACKAGES = ['tensorflow==1.8.0']。或其他版本。然后不要忘记重新生成tar并上传。

另外,在我的例子中,MLEngineTrainingOperator 似乎根本没有选择 runtime_versionpython_version 进入 ML Engine。

【讨论】:

    猜你喜欢
    • 2019-02-26
    • 2017-12-02
    • 1970-01-01
    • 2016-11-09
    • 2014-04-26
    • 2021-01-15
    • 2011-12-02
    • 2015-05-16
    • 1970-01-01
    相关资源
    最近更新 更多