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

what should l do next after get result #3

Closed wolf212121j closed 1 year ago

wolf212121j commented 1 year ago

Hello, I'm sorry to trouble you again. Yes, I have successfully finished running your train.py file and obtained the following files. However, because I am not familiar with reinforcement learning, I do not know how to operate it next. It would be my great honor to receive your reply.

l got 4 files: file(which contains completion_ratio.csv)、models(which contains ppo_model_0.pt. and so on)、debug.log、progress.csv

nuomizai commented 1 year ago

Hello, I'm sorry to trouble you again. Yes, I have successfully finished running your train.py file and obtained the following files. However, because I am not familiar with reinforcement learning, I do not know how to operate it next. It would be my great honor to receive your reply.

l got 4 files: file(which contains completion_ratio.csv)、models(which contains ppo_model_0.pt. and so on)、debug.log、progress.csv

Hi, @wolf212121j . Thanks for your attention. We have updated/added files in Cadre in order to evaluate the models. You can see the script under scripts/eval.sh for reference. Please also refer to the evaluation part in the README.md.

Unfortunately, in order to provide an environment wrapper that is easy to use for distributed DRL training, we reorganized our code and thus we didn't provide the models used in this paper. We have fixed some bugs in the EnvWrapper to achieve better performance. If you found the evaluation results weird, you can try to retrain the models using the latest code. We also co-currently train a model using the latest code in order to reproduce the results in this paper.

wolf212121j commented 1 year ago

Hello, I'm sorry to trouble you again. Yes, I have successfully finished running your train.py file and obtained the following files. However, because I am not familiar with reinforcement learning, I do not know how to operate it next. It would be my great honor to receive your reply. l got 4 files: file(which contains completion_ratio.csv)、models(which contains ppo_model_0.pt. and so on)、debug.log、progress.csv

Hi, @wolf212121j . Thanks for your attention. We have updated/added files in Cadre in order to evaluate the models. You can see the script under scripts/eval.sh for reference. Please also refer to the evaluation part in the README.md.

Unfortunately, in order to provide an environment wrapper that is easy to use for distributed DRL training, we reorganized our code and thus we didn't provide the models used in this paper. We have fixed some bugs in the EnvWrapper to achieve better performance. If you found the evaluation results weird, you can try to retrain the models using the latest code. We also co-currently train a model using the latest code in order to reproduce the results in this paper.

Hello, could you please tell me the version of agents, because when I tried to run the eval.sh file, it told me this error: ModuleNotFoundError: No module named 'agents'

nuomizai commented 1 year ago

Hello, I'm sorry to trouble you again. Yes, I have successfully finished running your train.py file and obtained the following files. However, because I am not familiar with reinforcement learning, I do not know how to operate it next. It would be my great honor to receive your reply. l got 4 files: file(which contains completion_ratio.csv)、models(which contains ppo_model_0.pt. and so on)、debug.log、progress.csv

Hi, @wolf212121j . Thanks for your attention. We have updated/added files in Cadre in order to evaluate the models. You can see the script under scripts/eval.sh for reference. Please also refer to the evaluation part in the README.md. Unfortunately, in order to provide an environment wrapper that is easy to use for distributed DRL training, we reorganized our code and thus we didn't provide the models used in this paper. We have fixed some bugs in the EnvWrapper to achieve better performance. If you found the evaluation results weird, you can try to retrain the models using the latest code. We also co-currently train a model using the latest code in order to reproduce the results in this paper.

Hello, could you please tell me the version of agents, because when I tried to run the eval.sh file, it told me this error: ModuleNotFoundError: No module named 'agents'

Could you post the complete error message that you got? And the full scripts (eval.sh) you used for evaluation? It seems that the Error is not related to the version of agents, but a misconfiguration of Path.

wolf212121j commented 1 year ago

ok,here is the complete error message :first,l met this problrm:

Traceback (most recent call last): File "/home/zz/data1/lunwen/Cadre/eval.py", line 6, in from env_wrapper import EnvWrapper File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 24, in from leaderboard.scenarios.route_scenario import RouteScenario File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/scenarios/route_scenario.py", line 22, in from agents.navigation.local_planner import RoadOption ModuleNotFoundError: No module named 'agents' To solve this problem, l try to pip install agents; then l face another problem: Traceback (most recent call last): File "/home/zz/data1/lunwen/Cadre/eval.py", line 6, in from env_wrapper import EnvWrapper File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 24, in from leaderboard.scenarios.route_scenario import RouteScenario File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/scenarios/route_scenario.py", line 22, in from agents.navigation.local_planner import RoadOption File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/init.py", line 21, in from . import algorithms File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/ppo.py", line 27, in import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow' so l try to pip install tensorflow==1.15;but l face another problem: Traceback (most recent call last): File "/home/zz/data1/lunwen/Cadre/eval.py", line 6, in from env_wrapper import EnvWrapper File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 24, in from leaderboard.scenarios.route_scenario import RouteScenario File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/scenarios/route_scenario.py", line 22, in from agents.navigation.local_planner import RoadOption File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/init.py", line 21, in from . import algorithms File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/ppo.py", line 27, in import tensorflow as tf File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow/init.py", line 99, in from tensorflow_core import * File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/init.py", line 36, in from tensorflow._api.v1 import compat File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/init.py", line 23, in from tensorflow._api.v1.compat import v1 File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/init.py", line 49, in from tensorflow._api.v1.compat.v1 import lite File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/lite/init.py", line 11, in from tensorflow._api.v1.compat.v1.lite import experimental File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/lite/experimental/init.py", line 10, in from tensorflow._api.v1.compat.v1.lite.experimental import nn File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/lite/experimental/nn/init.py", line 10, in from tensorflow.lite.python.lite import TFLiteLSTMCell File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/lite/python/lite.py", line 31, in from tensorflow.lite.experimental.microfrontend.python.ops import audio_microfrontend_op # pylint: disable=unused-import File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/lite/experimental/microfrontend/python/ops/audio_microfrontend_op.py", line 30, in resource_loader.get_path_to_datafile("_audio_microfrontend_op.so")) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/python/framework/load_library.py", line 78, in load_op_library exec(wrappers, module.dict) File "", line 32 def audio_microfrontend(audio, sample_rate=16000, window_size=25, window_step=10, num_channels=32, upper_band_limit=, lower_band_limit=, smoothing_bits=10, even_smoothing=, odd_smoothing=, min_signal_remaining=, enable_pcan=False, pcan_strength=, pcan_offset=, gain_bits=21, enable_log=True, scale_shift=6, left_context=0, right_context=0, frame_stride=1, zero_padding=False, out_scale=1, out_type=_dtypes.uint16, name=None): ^ SyntaxError: invalid syntax

nuomizai commented 1 year ago

ok,here is the complete error message :first,l met this problrm:

Traceback (most recent call last): File "/home/zz/data1/lunwen/Cadre/eval.py", line 6, in from env_wrapper import EnvWrapper File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 24, in from leaderboard.scenarios.route_scenario import RouteScenario File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/scenarios/route_scenario.py", line 22, in from agents.navigation.local_planner import RoadOption ModuleNotFoundError: No module named 'agents' To solve this problem, l try to pip install agents; then l face another problem: Traceback (most recent call last): File "/home/zz/data1/lunwen/Cadre/eval.py", line 6, in from env_wrapper import EnvWrapper File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 24, in from leaderboard.scenarios.route_scenario import RouteScenario File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/scenarios/route_scenario.py", line 22, in from agents.navigation.local_planner import RoadOption File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/init.py", line 21, in from . import algorithms File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/ppo.py", line 27, in import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow' so l try to pip install tensorflow==1.15;but l face another problem: Traceback (most recent call last): File "/home/zz/data1/lunwen/Cadre/eval.py", line 6, in from env_wrapper import EnvWrapper File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 24, in from leaderboard.scenarios.route_scenario import RouteScenario File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/scenarios/route_scenario.py", line 22, in from agents.navigation.local_planner import RoadOption File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/init.py", line 21, in from . import algorithms File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/ppo.py", line 27, in import tensorflow as tf File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow/init.py", line 99, in from tensorflow_core import * File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/init.py", line 36, in from tensorflow._api.v1 import compat File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/init.py", line 23, in from tensorflow._api.v1.compat import v1 File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/init.py", line 49, in from tensorflow._api.v1.compat.v1 import lite File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/lite/init.py", line 11, in from tensorflow._api.v1.compat.v1.lite import experimental File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/lite/experimental/init.py", line 10, in from tensorflow._api.v1.compat.v1.lite.experimental import nn File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/lite/experimental/nn/init.py", line 10, in from tensorflow.lite.python.lite import TFLiteLSTMCell File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/lite/python/lite.py", line 31, in from tensorflow.lite.experimental.microfrontend.python.ops import audio_microfrontend_op # pylint: disable=unused-import File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/lite/experimental/microfrontend/python/ops/audio_microfrontend_op.py", line 30, in resource_loader.get_path_to_datafile("_audio_microfrontend_op.so")) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/python/framework/load_library.py", line 78, in load_op_library exec(wrappers, module.dict) File "", line 32 def audio_microfrontend(audio, sample_rate=16000, window_size=25, window_step=10, num_channels=32, upper_band_limit=, lower_band_limit=, smoothing_bits=10, even_smoothing=, odd_smoothing=, min_signal_remaining=, enable_pcan=False, pcan_strength=, pcan_offset=, gain_bits=21, enable_log=True, scale_shift=6, left_context=0, right_context=0, frame_stride=1, zero_padding=False, out_scale=1, out_type=_dtypes.uint16, name=None): ^ SyntaxError: invalid syntax

agents is a module in carla that can't be installed through pip. Have you changed the CARLA_ROOT variable in the eval.sh script? Maybe you can first uninstall the agent through pip uninstall agent, and then rightly set the CARLA_ROOT variable in the eval.sh to your local path.

wolf212121j commented 1 year ago
  • [ ]

ok,here is the complete error message :first,l met this problrm: Traceback (most recent call last): File "/home/zz/data1/lunwen/Cadre/eval.py", line 6, in from env_wrapper import EnvWrapper File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 24, in from leaderboard.scenarios.route_scenario import RouteScenario File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/scenarios/route_scenario.py", line 22, in from agents.navigation.local_planner import RoadOption ModuleNotFoundError: No module named 'agents' To solve this problem, l try to pip install agents; then l face another problem: Traceback (most recent call last): File "/home/zz/data1/lunwen/Cadre/eval.py", line 6, in from env_wrapper import EnvWrapper File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 24, in from leaderboard.scenarios.route_scenario import RouteScenario File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/scenarios/route_scenario.py", line 22, in from agents.navigation.local_planner import RoadOption File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/init.py", line 21, in from . import algorithms File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/ppo.py", line 27, in import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow' so l try to pip install tensorflow==1.15;but l face another problem: Traceback (most recent call last): File "/home/zz/data1/lunwen/Cadre/eval.py", line 6, in from env_wrapper import EnvWrapper File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 24, in from leaderboard.scenarios.route_scenario import RouteScenario File "/home/zz/data1/lunwen/Cadre/leaderboard/leaderboard/scenarios/route_scenario.py", line 22, in from agents.navigation.local_planner import RoadOption File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/init.py", line 21, in from . import algorithms File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/init.py", line 21, in from .ppo import PPO File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/agents/algorithms/ppo/ppo.py", line 27, in import tensorflow as tf File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow/init.py", line 99, in from tensorflow_core import * File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/init.py", line 36, in from tensorflow._api.v1 import compat File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/init.py", line 23, in from tensorflow._api.v1.compat import v1 File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/init.py", line 49, in from tensorflow._api.v1.compat.v1 import lite File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/lite/init.py", line 11, in from tensorflow._api.v1.compat.v1.lite import experimental File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/lite/experimental/init.py", line 10, in from tensorflow._api.v1.compat.v1.lite.experimental import nn File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/_api/v1/compat/v1/lite/experimental/nn/init.py", line 10, in from tensorflow.lite.python.lite import TFLiteLSTMCell File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/lite/python/lite.py", line 31, in from tensorflow.lite.experimental.microfrontend.python.ops import audio_microfrontend_op # pylint: disable=unused-import File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/lite/experimental/microfrontend/python/ops/audio_microfrontend_op.py", line 30, in resource_loader.get_path_to_datafile("_audio_microfrontend_op.so")) File "/home/zz/anaconda3/envs/cadre/lib/python3.7/site-packages/tensorflow_core/python/framework/load_library.py", line 78, in load_op_library exec(wrappers, module.dict) File "", line 32 def audio_microfrontend(audio, sample_rate=16000, window_size=25, window_step=10, num_channels=32, upper_band_limit=, lower_band_limit=, smoothing_bits=10, even_smoothing=, odd_smoothing=, min_signal_remaining=, enable_pcan=False, pcan_strength=, pcan_offset=, gain_bits=21, enable_log=True, scale_shift=6, left_context=0, right_context=0, frame_stride=1, zero_padding=False, out_scale=1, out_type=_dtypes.uint16, name=None): ^ SyntaxError: invalid syntax

agents is a module in carla that can't be installed through pip. Have you changed the CARLA_ROOT variable in the eval.sh script? Maybe you can first uninstall the agent through pip uninstall agent, and then rightly set the CARLA_ROOT variable in the eval.sh to your local path.

Hello, I'm sorry to trouble you again. Well, I ran eval.sh with the file I trained, but I found that the results were quite different, so I tried running main.py again, but I couldn't run it.

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

Do you know how I should solve this problem, simple_test.sh and eval.sh I can run either

The following is the complete error

(cad) zz@zz-ms-7d45:~/data1/lunwen/Cadre/scripts$ /bin/bash /home/zz/data1/lunwen/Cadre/scripts/main.sh starting client at port 8010. starting client at port 8020. starting client at port 8030. starting client at port 8040. training results were saved in result/04-19/15-50-24/0 /home/zz/anaconda3/envs/cad/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/3000 [00:00<?, ?it/s]Process Process-3: Traceback (most recent call last): File "/home/zz/anaconda3/envs/cad/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/home/zz/anaconda3/envs/cad/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 22, in train env = EnvWrapper(env_cfg) File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 91, in init self.traffic_manager = self.client.get_trafficmanager(trafficManagerPort) RuntimeError: time-out of 60000ms while waiting for the simulator, make sure the simulator is ready and connected to localhost:8020 Process Process-4: Traceback (most recent call last): File "/home/zz/anaconda3/envs/cad/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/home/zz/anaconda3/envs/cad/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 22, in train env = EnvWrapper(env_cfg) File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 91, in init self.traffic_manager = self.client.get_trafficmanager(trafficManagerPort) RuntimeError: time-out of 60000ms while waiting for the simulator, make sure the simulator is ready and connected to localhost:8030 Process Process-5: Traceback (most recent call last): File "/home/zz/anaconda3/envs/cad/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/home/zz/anaconda3/envs/cad/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 22, in train env = EnvWrapper(env_cfg) File "/home/zz/data1/lunwen/Cadre/env_wrapper.py", line 91, in init self.traffic_manager = self.client.get_trafficmanager(trafficManagerPort) RuntimeError: time-out of 60000ms while waiting for the simulator, make sure the simulator is ready and connected to localhost:8040

wolf212121j commented 1 year ago

If possible, may I add your email address

nuomizai commented 1 year ago

If possible, may I add your email address

Yes, my email is ynzhao@bit.edu.cn