Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nuomizai opened this issue Jun 29, 2020 · 4 comments

Comments

@nuomizai
Copy link

nuomizai commented Jun 29, 2020

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
Copy link
Owner

bradyz commented Jun 29, 2020

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

@nuomizai
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

bradyz commented Jun 29, 2020

good catch! thanks for reporting this.

marking as closed for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants