Google Cloud MLでTensorFlowチュートリアルスクリプトを試してきました。 特に私はhttps://github.com/tensorflow/models/tree/master/tutorials/image/cifar10でcifar10 CNNチュートリアルスクリプトを使用しました。TensorFlowのメモリリークGoogle Cloud MLトレーニング
Google Cloud MLでこのトレーニングスクリプトを実行すると、1時間に約0.5%のメモリリークが発生します。
私はスクリプトを、必要なGCPフォーマット(https://cloud.google.com/ml-engine/docs/how-tos/packaging-trainerに記載)にパッケージ化し、.binデータファイルを含むストレージバケットに設定する以外の変更は行っていません。
ローカルで実行すると、Google Cloudではなくで、TCMALLOCを使用して、LD_PRELOAD = "/ usr/lib/libtcmalloc.so"を設定すると、メモリリークが解決されます。 ただし、Google Cloud MLではこのオプションはありません。
何が原因でリークが発生する可能性がありますか?これを修正するにはどうすればよいですか?他のユーザーが同じ問題に気づいていないのはなぜですか? リークはわずかですが、私のトレーニングセッションにメモリ不足が発生し、数日間自分自身のデータに対して実行すると失敗するほど十分です。 リークは、使用するGPUの数に関係なく発生します。
私が使用したのgcloudコマンドは次のとおりです。
gcloud ml-engine jobs submit training cifar10_job --job-dir gs://tfoutput/joboutput --package-path trainer --module-name=trainer.cifar10_multi_gpu_train --region europe-west1 --staging-bucket gs://tfoutput --scale-tier CUSTOM --config config.yml --runtime-version 1.0 -- --num_gpus=4
設定ファイル(config.yml)は次のとおりです。
trainingInput:
scaleTier: CUSTOM
masterType: complex_model_m_gpu
すべてのヘルプは感謝、感謝 。
google.protobuf.internalからの 'python -c"の出力を共有できますか?import api_implementation; print(api_implementation._default_implementation_type) "'ローカル?それは「cpp」ですか? – rhaertel80
@ rhaertel80はいこれはCloudMLエンジンの出力と一致する 'cpp' – Chris
です。今後も調査を続けます。 – rhaertel80