Skip to content

wait_ready not working correctly for Docker runtime #220

@jklaise

Description

@jklaise

Deploying a tempo model onto a Docker runtime and immediately calling it will result in an error:

Traceback (most recent call last):
  File "main.py", line 80, in <module>
    main()
  File "main.py", line 74, in main
    pred = object_detector.predict(img)
  File "/home/janis/.conda/envs/chrono/lib/python3.8/site-packages/tempo/serve/base.py", line 234, in predict
    return self.remote_with_spec(model_spec, *args, **kwargs)
  File "/home/janis/.conda/envs/chrono/lib/python3.8/site-packages/tempo/serve/base.py", line 269, in remote_with_spec
    response_raw = requests.post(endpoint, json=req, headers=headers, verify=ingress_options.verify_ssl)
  File "/home/janis/.conda/envs/chrono/lib/python3.8/site-packages/requests/api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/janis/.conda/envs/chrono/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/janis/.conda/envs/chrono/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/janis/.conda/envs/chrono/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/home/janis/.conda/envs/chrono/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
python main.py data/good_images/TfL_20200315_1300_00001.01251.jpg  5.10s user 1.51s system 32% cpu 20.344 total

This is despite the fact that model.wait_ready() is called as part of the call to deploy. The issue seems to be with the docker Python library.

@cliveseldon is there a specific bug or reference issue that describes the behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions