reese0106
reese0106

Reputation: 2071

Cloud ML Engine Prediction Service 'Read Operation Timed Out'

I am running into some issues with my prediction service where I am getting the error SSLError: ('The read operation timed out',) -- I am able to see from the 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.

Further, is there any way for me to understand if this read operation timeout is being caused by me (ie. something I am sending) or if it is caused by something on Google's side?

Upvotes: 1

Views: 357

Answers (1)

reese0106
reese0106

Reputation: 2071

I believe that the best approach to this would be to make the following change and updated execute() with num_retries=n where n can be any integer you would like.

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

Upvotes: 2

Related Questions