云 ML 引擎预测服务 'Read Operation Timed Out'

Cloud ML Engine Prediction Service 'Read Operation Timed Out'

我 运行 遇到了我的预测服务的一些问题,我收到了错误 SSLError: ('The read operation timed out',) -- 我可以从 code that the current num_retries is set to 0. Can anybody help me understand how I can update the num_retries so that more than 1 will be attempted? I am making my calls by following predict_json from this example.

中看到

此外,我有什么办法可以了解这个读取操作超时是由我造成的(即我正在发送的东西)还是由 Google 那边的东西造成的?

我认为最好的方法是进行以下更改并更新 execute() 为 num_retries=n,其中 n 可以是您想要的任何整数。

response = service.projects().predict(
    name=name,
    body={'instances': instances}
).execute(num_retries=2)