thomasmol / cog-whisper-diarization

Cog implementation of transcribing + diarization pipeline with Whisper & Pyannote
https://replicate.com/thomasmol/whisper-diarization
165 stars 51 forks source link

Replicate hosting of the model - Connection reset by peer #3

Closed MaximeDde closed 7 months ago

MaximeDde commented 8 months ago

Hello, I'm facing the current issue with strictly no idea how to solve it o.o When launching in regular files, I meet the following error once in 5 times I would say, while before, there were no issues (at least on the 2-months old version I was using so far).

The details of the error : Traceback (most recent call last): File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen response = self._make_request( File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request raise new_e File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn conn.connect() File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connection.py", line 653, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connection.py", line 806, in _ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrapsocket( File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/util/ssl.py", line 465, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, serverhostname) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/util/ssl.py", line 509, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/root/.pyenv/versions/3.10.13/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/root/.pyenv/versions/3.10.13/lib/python3.10/ssl.py", line 1104, in _create self.do_handshake() File "/root/.pyenv/versions/3.10.13/lib/python3.10/ssl.py", line 1375, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 104] Connection reset by peer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen retries = retries.increment( File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/util/retry.py", line 470, in increment raise reraise(type(error), error, _stacktrace) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/util/util.py", line 38, in reraise raise value.with_traceback(tb) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen response = self._make_request( File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request raise new_e File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn conn.connect() File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connection.py", line 653, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/connection.py", line 806, in _ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrapsocket( File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/util/ssl.py", line 465, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, serverhostname) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/urllib3/util/ssl.py", line 509, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/root/.pyenv/versions/3.10.13/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/root/.pyenv/versions/3.10.13/lib/python3.10/ssl.py", line 1104, in _create self.do_handshake() File "/root/.pyenv/versions/3.10.13/lib/python3.10/ssl.py", line 1375, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/src/predict.py", line 101, in predict response = requests.get(file_url) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, kwargs) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/cog/server/worker.py", line 217, in _predict result = predict(**payload) File "/src/predict.py", line 169, in predict raise RuntimeError("Error Running inference with local model", e) RuntimeError: ('Error Running inference with local model', ConnectionError(ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))))

Any hint as to how to solve this problem ? I'm running the model on an A40 Large GPU by the way.

thomasmol commented 7 months ago

I think this means the file url you sent is inaccessible, aka not publicly available/accessible. Never have encountered this error myself though.

You can check what print statements are executed to pinpoint where the error is raised