从 运行 作业断开连接后,如何在 Google Cloud SDK Shell 中再次显示日志?
After being disconnected from a running job, how to show logs again in Google Cloud SDK Shell?
我 运行 在 Google 的机器学习引擎上工作。我在 Windows 上从 Google Cloud SDK Shell 发布了这项工作。在某个时候,我关闭了我的笔记本电脑并失去了与 Google 云的连接。同时,作业将 运行 保留在 Google 的服务器上。现在我已经重新打开我的笔记本电脑并再次连接到互联网,shell 有输出:
ERROR: (gcloud.ml-engine.jobs.submit.training) There was a problem refreshing your current auth tokens: Unable to find the server at www.googleapis.com
Please run:
$gcloud auth login
to obtain new credentials.
所以我运行那个命令。打开浏览器,我点击了我的 Google 帐户并进行了身份验证。然后我看到:
You are now logged in as [my Google e-mail address].
Your current project is [None]. You can change this setting by running:
$ gcloud config set project PROJECT_ID
我也这样做了,然后看到了输出:
Updated property [core/project].
看来一切正常。在线,在 Google Cloud Console 中,我可以在 运行 期间查看我的作业日志。但是,我的问题是,是否可以让那些 logs/stdout 再次打印在我的 shell 中?
我猜您正在寻找类似 documentation page about ML Engine logging.
中解释的内容
您可以使用指定首选过滤器的日志记录服务,使用 gcloud beta logging read
或者,为了在控制台中打印 ML Engine 作业日志,您可以使用这个 ML Engine 特定的命令,以及选项和您需要的标志,以便打印您的作业日志:
gcloud ml-engine jobs stream-logs
您可以在 this other page 中找到该命令的参考资料。
我 运行 在 Google 的机器学习引擎上工作。我在 Windows 上从 Google Cloud SDK Shell 发布了这项工作。在某个时候,我关闭了我的笔记本电脑并失去了与 Google 云的连接。同时,作业将 运行 保留在 Google 的服务器上。现在我已经重新打开我的笔记本电脑并再次连接到互联网,shell 有输出:
ERROR: (gcloud.ml-engine.jobs.submit.training) There was a problem refreshing your current auth tokens: Unable to find the server at www.googleapis.com
Please run:
$gcloud auth login
to obtain new credentials.
所以我运行那个命令。打开浏览器,我点击了我的 Google 帐户并进行了身份验证。然后我看到:
You are now logged in as [my Google e-mail address].
Your current project is [None]. You can change this setting by running:
$ gcloud config set project PROJECT_ID
我也这样做了,然后看到了输出:
Updated property [core/project].
看来一切正常。在线,在 Google Cloud Console 中,我可以在 运行 期间查看我的作业日志。但是,我的问题是,是否可以让那些 logs/stdout 再次打印在我的 shell 中?
我猜您正在寻找类似 documentation page about ML Engine logging.
中解释的内容您可以使用指定首选过滤器的日志记录服务,使用 gcloud beta logging read
或者,为了在控制台中打印 ML Engine 作业日志,您可以使用这个 ML Engine 特定的命令,以及选项和您需要的标志,以便打印您的作业日志:
gcloud ml-engine jobs stream-logs
您可以在 this other page 中找到该命令的参考资料。