私はGoogle Cloudを使用してテストを行っていますが、ガイドに従ってBigQueryをテストしています。私は、スクリプトを実行したときにhttps://cloud.google.com/solutions/using-cloud-dataflow-for-batch-predictions-with-tensorflowGoogle DataflowにAttributeErrorが表示されます: 'モジュール'オブジェクトに '読み取り'属性がありません
:
python prediction/run.py \
--runner DataflowRunner \
--project $PROJECT \
--staging_location $BUCKET/staging \
--temp_location $BUCKET/temp \
--job_name $PROJECT-prediction-bq \
--setup_file prediction/setup.py \
--model $BUCKET/model \
--source bq \
--input $PROJECT:mnist.images \
--output $PROJECT:mnist.predict
それはapache_beamパッケージは、属性 '読む' を含んでいないように見えます
Traceback (most recent call last):
File "prediction/run.py", line 23, in <module>
predict.run()
File "/home/ahuoo_com/dataflow-prediction-example/prediction/modules/predict.py", line 98, in run
images = p | 'ReadFromBQ' >> beam.Read(beam.io.BigQuerySource(known_args.input))
**AttributeError: 'module' object has no attribute 'Read'**
を示しています。私はgithubで提供されているGoogleの例が間違っていると思う。あなたはライン98
でコードを見てみることができますテストを行うために、このガイドを使用して誰がいますか?
まあ 'apache_beam'は、[行21](https://github.com/GoogleCloudPlatform/dataflow-prediction-example/blob/46dba7abf3da856388b3d08e4ffd46ca56d67b1d/prediction/modules/predict.py#L21)を参照してください、輸入なっています。 モジュールがインストールされていることを確認します。 –