RuntimeError:`RunConfig`实例应该被'Experiment`

时间:2017-07-20 19:47:37

标签: tensorflow

尝试运行本教程实验:

https://cloud.google.com/ml-engine/docs/how-tos/getting-started-training-prediction#local-train-single

virtualenv,Python v2.7,TensorFlow v1.2中本地运行

执行此命令时:

gcloud ml-engine local train \
    --module-name trainer.task \
    --package-path trainer/ \
    -- \
    --train-files $TRAIN_DATA \
    --eval-files $EVAL_DATA \
    --train-steps 1000 \
    --job-dir $MODEL_DIR \
    --eval-steps 100

我收到以下错误:

RuntimeError: `RunConfig` instance is expected to be used by the `Estimator` inside the `Experiment`. 

expected 
_cluster_spec={}, 
_environment=u'cloud', 
_evaluation_master='', 
_is_chief=True, 
_master='', 
_model_dir='output', 
_num_ps_replicas=0, 
_num_worker_replicas=0, 
_task_id=0, 
_task_type=None, 
_tf_config=<tensorflow.core.protobuf.config_pb2.ConfigProto object at 0x111833938>, 

but got 
_cluster_spec={}, 
_environment=u'cloud', 
_evaluation_master='', 
_is_chief=True, 
_master='', 
_model_dir='output', 
_num_ps_replicas=0, 
_num_worker_replicas=0, 
_task_id=0, 
_task_type=None, 
_tf_config=<tensorflow.core.protobuf.config_pb2.ConfigProto object at 0x111833c80>

因此,它似乎没有在正确的地址找到_tf_config。无法找到有关如何进行设置的文档。感谢。

更新 似乎与我的virtualenv设置有关。当我原生安装tensorflow时工作正常。

0 个答案:

没有答案