BIT-MCS / Cadre

[AAAI 2022] CADRE: A Cascade Deep Reinforcement Learning Framework for Vision-based Autonomous Urban Driving
MIT License
26 stars 2 forks source link

file not found #2

Closed wolf212121j closed 1 year ago

wolf212121j commented 1 year ago

l meet this problem,and l don't know how to deal with it? if someone who solve this problem,please tell me how to deal with it, thank you.

/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/requests/init.py:114: RequestsDependencyWarning: urllib3 (1.26.14) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version! RequestsDependencyWarning, starting client at port 8010. training results were saved in result/04-10/10-27-50/0 Traceback (most recent call last): File "/home/zz/data1/lunwen/Cadre/simple_test.py", line 31, in env = EnvWrapper(env_cfg) File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 154, in init self.route_indexer = PriorityRouteIndexer(config.routes, config.scenarios, config.amount) File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/utils/priority_route_indexer.py", line 20, in init route_descriptions_list = RouteParser.parse_routes_file(self._routes_file,self._scenarios_file, False) File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/utils/route_parser.py", line 55, in parse_routes_file tree = ET.parse(route_filename) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/xml/etree/ElementTree.py", line 1198, in parse tree.parse(source, parser) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/xml/etree/ElementTree.py", line 587, in parse source = open(source, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'nocrash_route/Nocrash_follow_lane_turn_route.xml'

nuomizai commented 1 year ago

Hi, @wolf212121j , sorry for the trouble. Have you configured the path to the project on your local server correctly as in the scripts under /script/main.sh?

export CHALLENGE_DIR=/home/quan/Cadre # change to where you clone this project

wolf2127 commented 1 year ago

Hi, @wolf212121j , sorry for the trouble. Have you configured the path to the project on your local server correctly as in the scripts under /script/main.sh?

export CHALLENGE_DIR=/home/quan/Cadre # change to where you clone this project

hi,@nuomizai,l have solved this problem. the problem is I need to change the path of the agent from relative to absolute.

nuomizai commented 1 year ago

Hi, @wolf212121j , sorry for the trouble. Have you configured the path to the project on your local server correctly as in the scripts under /script/main.sh? export CHALLENGE_DIR=/home/quan/Cadre # change to where you clone this project

hi,@nuomizai,l have solved this problem. the problem is I need to change the path of the agent from relative to absolute.

Good to know. If you have any problem with this project later, don't hesitate to post an issue.

wolf212121j commented 1 year ago

Hi, @wolf212121j , sorry for the trouble. Have you configured the path to the project on your local server correctly as in the scripts under /script/main.sh? export CHALLENGE_DIR=/home/quan/Cadre # change to where you clone this project

hi,@nuomizai,l have solved this problem. the problem is I need to change the path of the agent from relative to absolute.

Good to know. If you have any problem with this project later, don't hesitate to post an issue.

First of all, thank you very much for replying to my message. I feel honored.l am really intersted in your work and feel that your work has helped me a lot. Secondly, when l start try to training, I ran into a new error when l try to run the main.sh file. here's the problem l faced :

(cadre) zz@zz-ms-7d45:~/data1/lunwen/Cadre/scripts$ ./main.sh /home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/requests/init.py:114: RequestsDependencyWarning: urllib3 (1.26.14) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version! RequestsDependencyWarning, /home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/requests/init.py:114: RequestsDependencyWarning: urllib3 (1.26.14) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version! RequestsDependencyWarning, /home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/requests/init.py:114: RequestsDependencyWarning: urllib3 (1.26.14) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version! RequestsDependencyWarning, starting client at port 8010. training results were saved in result/04-10/16-53-01/0 /home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/gym/spaces/box.py:127: UserWarning: WARN: Box bound precision lowered by casting to float64 logger.warn(f"Box bound precision lowered by casting to {self.dtype}") ==> network parameters in pre-trained file /home/zz/data1/lunwen/Cadre/carla_perception/Experiments34/danet912_nocrash_IL_n10_k1234_r40/net_epoch90 can strictly match 0%| | 0/2 [00:00<?, ?it/s]/home/zz/data1/lunwen/Cadre/ppo_agent/distributions.py:97: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument. probs = F.softmax(self.logits) 0%| | 0/2 [00:09<?, ?it/s] Process Process-2: Traceback (most recent call last): File "/home/zz/anaconda3/envs/cadre/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/home/zz/anaconda3/envs/cadre/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, self._kwargs) File "/home/zz/data1/lunwen/Cadre/ppo_agent/train.py", line 70, in train next_steer_value, next_throttle_value = agent.get_value(done, steer_batch, throttle_batch) File "/home/zz/data1/lunwen/Cadre/ppo_agent/agent.py", line 162, in get_value self.hidden_state) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, *kwargs) File "/home/zz/data1/lunwen/Cadre/ppo_agent/models.py", line 142, in forward hidden_state = self.rnn(x, hidden_state) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(input, kwargs) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/torch/nn/modules/rnn.py", line 1183, in forward f"LSTMCell: Expected input to be 1-D or 2-D but received {input.dim()}-D tensor" AssertionError: LSTMCell: Expected input to be 1-D or 2-D but received 3-D tensor

l would appreciate if you can tell me what should l do, thank you!

nuomizai commented 1 year ago

Hi, @wolf212121j , sorry for the trouble. Have you configured the path to the project on your local server correctly as in the scripts under /script/main.sh? export CHALLENGE_DIR=/home/quan/Cadre # change to where you clone this project

hi,@nuomizai,l have solved this problem. the problem is I need to change the path of the agent from relative to absolute.

Good to know. If you have any problem with this project later, don't hesitate to post an issue.

First of all, thank you very much for replying to my message. I feel honored.l am really intersted in your work and feel that your work has helped me a lot. Secondly, when l start try to training, I ran into a new error when l try to run the main.sh file. here's the problem l faced :

(cadre) zz@zz-ms-7d45:~/data1/lunwen/Cadre/scripts$ ./main.sh /home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/requests/init.py:114: RequestsDependencyWarning: urllib3 (1.26.14) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version! RequestsDependencyWarning, /home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/requests/init.py:114: RequestsDependencyWarning: urllib3 (1.26.14) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version! RequestsDependencyWarning, /home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/requests/init.py:114: RequestsDependencyWarning: urllib3 (1.26.14) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version! RequestsDependencyWarning, starting client at port 8010. training results were saved in result/04-10/16-53-01/0 /home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/gym/spaces/box.py:127: UserWarning: WARN: Box bound precision lowered by casting to float64 logger.warn(f"Box bound precision lowered by casting to {self.dtype}") ==> network parameters in pre-trained file /home/zz/data1/lunwen/Cadre/carla_perception/Experiments34/danet912_nocrash_IL_n10_k1234_r40/net_epoch90 can strictly match 0%| | 0/2 [00:00<?, ?it/s]/home/zz/data1/lunwen/Cadre/ppo_agent/distributions.py:97: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument. probs = F.softmax(self.logits) 0%| | 0/2 [00:09<?, ?it/s] Process Process-2: Traceback (most recent call last): File "/home/zz/anaconda3/envs/cadre/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/home/zz/anaconda3/envs/cadre/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, self._kwargs) File "/home/zz/data1/lunwen/Cadre/ppo_agent/train.py", line 70, in train next_steer_value, next_throttle_value = agent.get_value(done, steer_batch, throttle_batch) File "/home/zz/data1/lunwen/Cadre/ppo_agent/agent.py", line 162, in get_value self.hidden_state) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, *kwargs) File "/home/zz/data1/lunwen/Cadre/ppo_agent/models.py", line 142, in forward hidden_state = self.rnn(x, hidden_state) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(input, kwargs) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/torch/nn/modules/rnn.py", line 1183, in forward f"LSTMCell: Expected input to be 1-D or 2-D but received {input.dim()}-D tensor" AssertionError: LSTMCell: Expected input to be 1-D or 2-D but received 3-D tensor

l would appreciate if you can tell me what should l do, thank you!

Hi, @wolf212121j . We think this is due to the mismatch between the new storage.py file and the old agent. We have fixed it in the latest version. Please try to pull the whole project again. Also, in our latest version, we add some log files to record the training process and the model files under the result directory. And you can update your virtual environment by running the latest requirements.txt with the command pip install -r requirements.txt