Algorithm failed

Algorithm failed  

  By: Karol-G on Jan. 4, 2022, 3:35 p.m.

Hi,

it seems my algorithm failed, but I don't know why as I cannot inspect the logs. You said in another post that you can see the logs. Could you please tell my why my algorithm failed?

Best, Karol

Re: Algorithm failed  

  By: ecemsogancioglu on Jan. 4, 2022, 5:46 p.m.

Hi,

this is the error: (beware that your algorithm container will not have any internet access when it is run on grand-challenge)

2022-01-04T15:31:12+00:00 Traceback (most recent call last): 2022-01-04T15:31:12+00:00 File "/opt/algorithm/yolov5/utils/plots.py", line 57, in check_font 2022-01-04T15:31:12+00:00 return ImageFont.truetype(str(font) if font.exists() else font.name, size) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/site-packages/PIL/ImageFont.py", line 855, in truetype 2022-01-04T15:31:12+00:00 return freetype(font) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/site-packages/PIL/ImageFont.py", line 852, in freetype 2022-01-04T15:31:12+00:00 return FreeTypeFont(font, size, index, encoding, layout_engine) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/site-packages/PIL/ImageFont.py", line 212, in init 2022-01-04T15:31:12+00:00 font, size, index, encoding, layout_engine=layout_engine 2022-01-04T15:31:12+00:00 OSError: cannot open resource 2022-01-04T15:31:12+00:00 2022-01-04T15:31:12+00:00 During handling of the above exception, another exception occurred: 2022-01-04T15:31:12+00:00 2022-01-04T15:31:12+00:00 Traceback (most recent call last): 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/urllib/request.py", line 1350, in do_open 2022-01-04T15:31:12+00:00 encode_chunked=req.has_header('Transfer-encoding')) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/http/client.py", line 1281, in request 2022-01-04T15:31:12+00:00 self._send_request(method, url, body, headers, encode_chunked) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/http/client.py", line 1327, in _send_request 2022-01-04T15:31:12+00:00 self.endheaders(body, encode_chunked=encode_chunked) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/http/client.py", line 1276, in endheaders 2022-01-04T15:31:12+00:00 self._send_output(message_body, encode_chunked=encode_chunked) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/http/client.py", line 1036, in _send_output 2022-01-04T15:31:12+00:00 self.send(msg) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/http/client.py", line 976, in send 2022-01-04T15:31:12+00:00 self.connect() 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/http/client.py", line 1443, in connect 2022-01-04T15:31:12+00:00 super().connect() 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/http/client.py", line 948, in connect 2022-01-04T15:31:12+00:00 (self.host,self.port), self.timeout, self.source_address) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/socket.py", line 707, in create_connection 2022-01-04T15:31:12+00:00 for res in getaddrinfo(host, port, 0, SOCK_STREAM): 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/socket.py", line 752, in getaddrinfo 2022-01-04T15:31:12+00:00 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 2022-01-04T15:31:12+00:00 socket.gaierror: [Errno -3] Temporary failure in name resolution 2022-01-04T15:31:12+00:00 2022-01-04T15:31:12+00:00 During handling of the above exception, another exception occurred: 2022-01-04T15:31:12+00:00 2022-01-04T15:31:12+00:00 Traceback (most recent call last): 2022-01-04T15:31:12+00:00 File "process.py", line 19, in 2022-01-04T15:31:12+00:00 import yolov5.detect 2022-01-04T15:31:12+00:00 File "/opt/algorithm/yolov5/detect.py", line 30, in 2022-01-04T15:31:12+00:00 from models.common import DetectMultiBackend 2022-01-04T15:31:12+00:00 File "/opt/algorithm/yolov5/models/common.py", line 26, in 2022-01-04T15:31:12+00:00 from utils.plots import Annotator, colors, save_one_box 2022-01-04T15:31:12+00:00 File "/opt/algorithm/yolov5/utils/plots.py", line 68, in 2022-01-04T15:31:12+00:00 class Annotator: 2022-01-04T15:31:12+00:00 File "/opt/algorithm/yolov5/utils/plots.py", line 70, in Annotator 2022-01-04T15:31:12+00:00 check_font() # download TTF if necessary 2022-01-04T15:31:12+00:00 File "/opt/algorithm/yolov5/utils/plots.py", line 61, in check_font 2022-01-04T15:31:12+00:00 torch.hub.download_url_to_file(url, str(font), progress=False) 2022-01-04T15:31:12+00:00 File "/home/algorithm/.local/lib/python3.7/site-packages/torch/hub.py", line 437, in download_url_to_file 2022-01-04T15:31:12+00:00 u = urlopen(req) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/urllib/request.py", line 222, in urlopen 2022-01-04T15:31:12+00:00 return opener.open(url, data, timeout) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/urllib/request.py", line 525, in open 2022-01-04T15:31:12+00:00 response = self._open(req, data) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/urllib/request.py", line 543, in _open 2022-01-04T15:31:12+00:00 '_open', req) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/urllib/request.py", line 503, in _call_chain 2022-01-04T15:31:12+00:00 result = func(*args) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/urllib/request.py", line 1393, in https_open 2022-01-04T15:31:12+00:00 context=self._context, check_hostname=self._check_hostname) 2022-01-04T15:31:12+00:00 File "/opt/conda/lib/python3.7/urllib/request.py", line 1352, in do_open 2022-01-04T15:31:12+00:00 raise URLError(err) 2022-01-04T15:31:12+00:00 urllib.error.URLError:

Re: Algorithm failed  

  By: Karol-G on Jan. 4, 2022, 6:13 p.m.

Ah, thanks I forgot about that. I will have to cache the necessary files then.

Best, Karol