我遇到了我的预测服务的一些问题,我收到错误SSLError: ('The read operation timed out',)
- 我可以从code看到当前num_retries
设置为0任何人都可以帮我理解我如何更新num_retries
以便尝试超过1次?我正在通过此example predict_json
跟踪Truncate
来拨打电话。
此外,有没有办法让我理解这个读操作超时是由我引起的(即我发送的东西)还是由Google的某些东西造成的?
答案 0 :(得分:1)
我认为最好的方法是进行以下更改并使用num_retries=n
更新execute(),其中n可以是您想要的任何整数。
response = service.projects().predict(
name=name,
body={'instances': instances}
).execute(num_retries=2)