2
我在我的tensorflow程序中使用了额外的python依赖项。如何通过Cloud ML部署培训工作?如何使用其他python依赖项部署Cloud ML培训作业?
我在我的tensorflow程序中使用了额外的python依赖项。如何通过Cloud ML部署培训工作?如何使用其他python依赖项部署Cloud ML培训作业?
如果您的依赖关系在PyPI上,您可以将它们声明为自定义setup.py文件中的依赖项。见http://python-packaging.readthedocs.io/en/latest/dependencies.html。一旦你创建了你的setup.py文件,正常使用gcloud beta ml jobs submit training
,你的代码将使用你的setup.py文件构建。
运行gcloud beta ml jobs submit training --help
了解更多信息。
如果您的依赖不在PyPI上,您可以按照此处的说明http://python-packaging.readthedocs.io/en/latest/dependencies.html#packages-not-on-pypi,或者您可以手动将tar.gz存档传递给gcloud,标记为--packages
。