bradyz / 2020_CARLA_challenge

"Learning by Cheating" (CoRL 2019) submission for the 2020 CARLA Challenge
182 stars 50 forks source link

Could not setup required agent due to <urlopen error [Errno 110] Connection timed out> #11

Closed nuomizai closed 4 years ago

nuomizai commented 4 years ago

I met this problem when I ran the test agent:

./run_agent.sh

I found the reason is that the ImageAgent could not load the model correctly.

class ImageAgent(BaseAgent):
    def setup(self, path_to_conf_file):
        super().setup(path_to_conf_file)

        self.converter = Converter()
        self.net = ImageModel.load_from_checkpoint(path_to_conf_file)
        self.net.cuda()
        self.net.eval()

The model file was downloaded from the website slack, and I printed the path_to_conf_file, which was set as the absolute path as :

/home/quan/2020_CARLA_challenge/epoch=24.ckpt

I wondered that if I should set a relative path. If so, where should I put the model file?

bradyz commented 4 years ago

that should be the correct usage - is the connection timed out error due to carla not being run on the correct port?

nuomizai commented 4 years ago

that should be the correct usage - is the connection timed out error due to carla not being run on the correct port?

Thank you, @bradyz . I'm afraid it couldn't be. If I change $PORT to other number like 2001, I will meet the error as:

RuntimeError: time-out of 30000ms while waiting for the simulator, make sure the simulator is ready and connected to localhost:2001

But if I set $PORT as 2000, this error information will disappear. BTW, what is the cuda setting when you trained your model? Could it be possible that the error is due to a false gpu device matching?

nuomizai commented 4 years ago

Hey, @bradyz . I solved this problem!!!! I neglected an important error information! The whole error information was as follows:

Downloading: "https://download.pytorch.org/models/resnet50-19c8e357.pth" to /home/quan/.cache/torch/checkpoints/resnet50-19c8e357.pth
Could not setup required agent due to <urlopen error [Errno 110] Connection timed out>

It seemed that the problem existed in my network. So I went to the website and downloaded the required file into the path ~/.cache/torch/checkpoints/. And I ran the run_agent.sh correctly!

bradyz commented 4 years ago

good catch! thanks for reporting this.

marking as closed for now