I have trained a model on third of the highD dataset with the environment configurations and hyperparameters provided in your paper and I could get a good model with similar figures ( reward , goal reaching rate and other info_keywords ) to your model figures, however I can’t generate a solution ! , this is console output when running generate_solution,py :
[INFO] commonroad_rl.gym_commonroad.commonroad_env - Testing on ../pickles/problem_test with 267 scenarios [DEBUG] commonroad_rl.gym_commonroad.commonroad_env - Meta scenario path: ../pickles/meta_scenario [DEBUG] commonroad_rl.gym_commonroad.commonroad_env - Training data path: /home/marihan/commonroad-rl/pickles/problem_train [DEBUG] commonroad_rl.gym_commonroad.commonroad_env - Testing data path: ../pickles/problem_test [DEBUG] commonroad_rl.gym_commonroad.commonroad_env - Initialization done Loading a model without an environment, this model cannot be trained until it has a valid environment. 2024-11-23 21:57:55.254100: I tensorflow/core/platform/cpu_feature_guard.cc:145] This TensorFlow binary is optimized with Intel(R) MKL-DNN to use the following CPU instructions in performance critical operations: SSE4.1 SSE4.2 AVX AVX2 FMA To enable them in non-MKL-DNN operations, rebuild TensorFlow with the appropriate compiler flags. 2024-11-23 21:57:55.257504: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2499950000 Hz 2024-11-23 21:57:55.257786: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x57d5db8bfaa0 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2024-11-23 21:57:55.257799: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version [DEBUG] commonroad_rl.gym_commonroad.commonroad_env - Number of scenarios left 267 /home/marihan/anaconda3/envs/cr37/lib/python3.7/site-packages/commonroad_route_planner/route.py:317: RuntimeWarning: invalid value encountered in true_divide return (x_d * y_dd - x_dd * y_d) / ((x_d ** 2 + y_d ** 2) ** (3. / 2.)) Step: 1, Reward: [0.], Done: [False] Step: 2, Reward: [0.], Done: [False] Step: 3, Reward: [0.], Done: [False] Step: 4, Reward: [0.], Done: [False] Step: 5, Reward: [0.], Done: [False] Step: 6, Reward: [0.], Done: [False] Step: 7, Reward: [0.], Done: [False] Step: 8, Reward: [0.], Done: [False] Step: 9, Reward: [0.], Done: [False] Step: 10, Reward: [0.], Done: [False] Step: 11, Reward: [0.], Done: [False] Step: 12, Reward: [0.], Done: [False] Step: 13, Reward: [0.], Done: [False] Step: 14, Reward: [0.], Done: [False] Step: 15, Reward: [0.], Done: [False] Step: 16, Reward: [0.], Done: [False] Step: 17, Reward: [0.], Done: [False] Step: 18, Reward: [0.], Done: [False] Step: 19, Reward: [0.], Done: [False] Step: 20, Reward: [0.], Done: [False] Step: 21, Reward: [0.], Done: [False] Step: 22, Reward: [0.], Done: [False] Step: 23, Reward: [0.], Done: [False] Step: 24, Reward: [0.], Done: [False] Step: 25, Reward: [0.], Done: [False] Step: 26, Reward: [0.], Done: [False] Step: 27, Reward: [0.], Done: [False] Step: 28, Reward: [0.], Done: [False] Step: 29, Reward: [0.], Done: [False] Step: 30, Reward: [0.], Done: [False] Step: 31, Reward: [0.], Done: [False] Step: 32, Reward: [0.], Done: [False] Step: 33, Reward: [0.], Done: [False] Step: 34, Reward: [0.], Done: [False] Step: 35, Reward: [0.], Done: [False] Step: 36, Reward: [0.], Done: [False] Step: 37, Reward: [0.], Done: [False] Step: 38, Reward: [0.], Done: [False] Step: 39, Reward: [0.], Done: [False] Step: 40, Reward: [0.], Done: [False] Step: 41, Reward: [0.], Done: [False] Step: 42, Reward: [0.], Done: [False] Step: 43, Reward: [0.], Done: [False] Step: 44, Reward: [0.], Done: [False] Step: 45, Reward: [0.], Done: [False] Step: 46, Reward: [0.], Done: [False] Step: 47, Reward: [0.], Done: [False] Step: 48, Reward: [0.], Done: [False] Step: 49, Reward: [0.], Done: [False] Step: 50, Reward: [0.], Done: [False] Step: 51, Reward: [0.], Done: [False] Step: 52, Reward: [0.], Done: [False] Step: 53, Reward: [0.], Done: [False] Step: 54, Reward: [0.], Done: [False] Step: 55, Reward: [0.], Done: [False] Step: 56, Reward: [0.], Done: [False] Step: 57, Reward: [0.], Done: [False] Step: 58, Reward: [0.], Done: [False] Step: 59, Reward: [0.], Done: [False] Step: 60, Reward: [0.], Done: [False] Step: 61, Reward: [0.], Done: [False] Step: 62, Reward: [0.], Done: [False] Step: 63, Reward: [0.], Done: [False] Step: 64, Reward: [0.], Done: [False] Step: 65, Reward: [0.], Done: [False] Step: 66, Reward: [0.], Done: [False] Step: 67, Reward: [0.], Done: [False] Step: 68, Reward: [0.], Done: [False] Step: 69, Reward: [0.], Done: [False] Step: 70, Reward: [0.], Done: [False] Step: 71, Reward: [0.], Done: [False] Step: 72, Reward: [0.], Done: [False] Step: 73, Reward: [0.], Done: [False] Step: 74, Reward: [0.], Done: [False] Step: 75, Reward: [0.], Done: [False] Step: 76, Reward: [0.], Done: [False] Step: 77, Reward: [0.], Done: [False] Step: 78, Reward: [0.], Done: [False] Step: 79, Reward: [0.], Done: [False] Step: 80, Reward: [0.], Done: [False] Step: 81, Reward: [0.], Done: [False] Step: 82, Reward: [0.], Done: [False] Step: 83, Reward: [0.], Done: [False] Step: 84, Reward: [0.], Done: [False] Step: 85, Reward: [0.], Done: [False] Step: 86, Reward: [0.], Done: [False] Step: 87, Reward: [0.], Done: [False] Step: 88, Reward: [0.], Done: [False] Step: 89, Reward: [0.], Done: [False] Step: 90, Reward: [0.], Done: [False] Step: 91, Reward: [0.], Done: [False] Step: 92, Reward: [0.], Done: [False] Step: 93, Reward: [0.], Done: [False] Step: 94, Reward: [0.], Done: [False] Step: 95, Reward: [0.], Done: [False] Step: 96, Reward: [0.], Done: [False] Step: 97, Reward: [0.], Done: [False] Step: 98, Reward: [0.], Done: [False] Step: 99, Reward: [0.], Done: [False] Step: 100, Reward: [0.], Done: [False] Step: 101, Reward: [0.], Done: [False] Step: 102, Reward: [0.], Done: [False] Step: 103, Reward: [0.], Done: [False] Step: 104, Reward: [0.], Done: [False] Step: 105, Reward: [0.], Done: [False] Step: 106, Reward: [0.], Done: [False] Step: 107, Reward: [0.], Done: [False] Step: 108, Reward: [0.], Done: [False] Step: 109, Reward: [0.], Done: [False] Step: 110, Reward: [0.], Done: [False] Step: 111, Reward: [0.], Done: [False] Step: 112, Reward: [0.], Done: [False] Step: 113, Reward: [0.], Done: [False] Step: 114, Reward: [0.], Done: [False] Step: 115, Reward: [0.], Done: [False] Step: 116, Reward: [0.], Done: [False] Step: 117, Reward: [0.], Done: [False] Step: 118, Reward: [0.], Done: [False] Step: 119, Reward: [0.], Done: [False] Step: 120, Reward: [0.], Done: [False] Step: 121, Reward: [0.], Done: [False] Step: 122, Reward: [0.], Done: [False] Step: 123, Reward: [0.], Done: [False] Step: 124, Reward: [0.], Done: [False] Step: 125, Reward: [0.], Done: [False] Step: 126, Reward: [0.], Done: [False] Step: 127, Reward: [0.], Done: [False] Step: 128, Reward: [0.], Done: [False] Step: 129, Reward: [0.], Done: [False] Step: 130, Reward: [0.], Done: [False] Step: 131, Reward: [0.], Done: [False] Step: 132, Reward: [0.], Done: [False] Step: 133, Reward: [0.], Done: [False] Step: 134, Reward: [0.], Done: [False] Step: 135, Reward: [0.], Done: [False] Step: 136, Reward: [0.], Done: [False] Step: 137, Reward: [0.], Done: [False] Step: 138, Reward: [0.], Done: [False] Step: 139, Reward: [0.], Done: [False] Step: 140, Reward: [0.], Done: [False] Step: 141, Reward: [0.], Done: [False] Step: 142, Reward: [0.], Done: [False] Step: 143, Reward: [0.], Done: [False] Step: 144, Reward: [0.], Done: [False] Step: 145, Reward: [0.], Done: [False] Step: 146, Reward: [0.], Done: [False] Step: 147, Reward: [0.], Done: [False] Step: 148, Reward: [0.], Done: [False] Step: 149, Reward: [0.], Done: [False] Step: 150, Reward: [0.], Done: [False] Step: 151, Reward: [0.], Done: [False] Step: 152, Reward: [0.], Done: [False] Step: 153, Reward: [0.], Done: [False] Step: 154, Reward: [0.], Done: [False] Goal not reached Termination reason: is_time_out [DEBUG] commonroad_rl.gym_commonroad.commonroad_env - Number of scenarios left 266 Step: 0, Reward: [-3.1359117], Done: [ True] Step: 1, Reward: [0.], Done: [False] Step: 2, Reward: [0.], Done: [False] Step: 3, Reward: [0.], Done: [False] Step: 4, Reward: [0.], Done: [False] Step: 5, Reward: [0.], Done: [False] Step: 6, Reward: [0.], Done: [False] Step: 7, Reward: [0.], Done: [False] Step: 8, Reward: [0.], Done: [False] Step: 9, Reward: [0.], Done: [False] Step: 10, Reward: [0.], Done: [False] Step: 11, Reward: [0.], Done: [False] Step: 12, Reward: [0.], Done: [False] Step: 13, Reward: [0.], Done: [False] Step: 14, Reward: [0.], Done: [False] Step: 15, Reward: [0.], Done: [False] Step: 16, Reward: [0.], Done: [False] Step: 17, Reward: [0.], Done: [False] Step: 18, Reward: [0.], Done: [False] Step: 19, Reward: [0.], Done: [False] Step: 20, Reward: [0.], Done: [False] Step: 21, Reward: [0.], Done: [False] Step: 22, Reward: [0.], Done: [False] Step: 23, Reward: [0.], Done: [False] Step: 24, Reward: [0.], Done: [False] Step: 25, Reward: [0.], Done: [False] Step: 26, Reward: [0.], Done: [False] Step: 27, Reward: [0.], Done: [False] Step: 28, Reward: [0.], Done: [False] Step: 29, Reward: [0.], Done: [False] Step: 30, Reward: [0.], Done: [False] Step: 31, Reward: [0.], Done: [False] Step: 32, Reward: [0.], Done: [False] Step: 33, Reward: [0.], Done: [False] Step: 34, Reward: [0.], Done: [False] Step: 35, Reward: [0.], Done: [False] Step: 36, Reward: [0.], Done: [False] Step: 37, Reward: [0.], Done: [False] Step: 38, Reward: [0.], Done: [False] Step: 39, Reward: [0.], Done: [False] Step: 40, Reward: [0.], Done: [False] Step: 41, Reward: [0.], Done: [False] Step: 42, Reward: [0.], Done: [False] Step: 43, Reward: [0.], Done: [False] Step: 44, Reward: [0.], Done: [False] Step: 45, Reward: [0.], Done: [False] Step: 46, Reward: [0.], Done: [False] Step: 47, Reward: [0.], Done: [False] Step: 48, Reward: [0.], Done: [False] Step: 49, Reward: [0.], Done: [False] Step: 50, Reward: [0.], Done: [False] Step: 51, Reward: [0.], Done: [False] Step: 52, Reward: [0.], Done: [False] Step: 53, Reward: [0.], Done: [False] Step: 54, Reward: [0.], Done: [False] Step: 55, Reward: [0.], Done: [False] Step: 56, Reward: [0.], Done: [False] Step: 57, Reward: [0.], Done: [False] Step: 58, Reward: [0.], Done: [False] Step: 59, Reward: [0.], Done: [False] Step: 60, Reward: [0.], Done: [False] Step: 61, Reward: [0.], Done: [False] Step: 62, Reward: [0.], Done: [False] Step: 63, Reward: [0.], Done: [False] Step: 64, Reward: [0.], Done: [False] Step: 65, Reward: [0.], Done: [False] Step: 66, Reward: [0.], Done: [False] Step: 67, Reward: [0.], Done: [False] Step: 68, Reward: [0.], Done: [False] Step: 69, Reward: [0.], Done: [False] Step: 70, Reward: [0.], Done: [False] Step: 71, Reward: [0.], Done: [False] Step: 72, Reward: [0.], Done: [False] Step: 73, Reward: [0.], Done: [False] Step: 74, Reward: [0.], Done: [False] Step: 75, Reward: [0.], Done: [False] Step: 76, Reward: [0.], Done: [False] Step: 77, Reward: [0.], Done: [False] Step: 78, Reward: [0.], Done: [False] Step: 79, Reward: [0.], Done: [False] Step: 80, Reward: [0.], Done: [False] Step: 81, Reward: [0.], Done: [False] Step: 82, Reward: [0.], Done: [False] Step: 83, Reward: [0.], Done: [False] Step: 84, Reward: [0.], Done: [False] Step: 85, Reward: [0.], Done: [False] Step: 86, Reward: [0.], Done: [False] Step: 87, Reward: [0.], Done: [False] Step: 88, Reward: [0.], Done: [False] Step: 89, Reward: [0.], Done: [False] Step: 90, Reward: [0.], Done: [False] Step: 91, Reward: [0.], Done: [False] Step: 92, Reward: [0.], Done: [False] Step: 93, Reward: [0.], Done: [False] Step: 94, Reward: [0.], Done: [False] Step: 95, Reward: [0.], Done: [False] Step: 96, Reward: [0.], Done: [False] Step: 97, Reward: [0.], Done: [False] Step: 98, Reward: [0.], Done: [False] Step: 99, Reward: [0.], Done: [False] Step: 100, Reward: [0.], Done: [False] Step: 101, Reward: [0.], Done: [False] Step: 102, Reward: [0.], Done: [False] Step: 103, Reward: [0.], Done: [False] Step: 104, Reward: [0.], Done: [False] Step: 105, Reward: [0.], Done: [False] Step: 106, Reward: [0.], Done: [False] Step: 107, Reward: [0.], Done: [False] Step: 108, Reward: [0.], Done: [False] Step: 109, Reward: [0.], Done: [False] Step: 110, Reward: [0.], Done: [False] Step: 111, Reward: [0.], Done: [False] Step: 112, Reward: [0.], Done: [False] Step: 113, Reward: [0.], Done: [False] Step: 114, Reward: [0.], Done: [False] Step: 115, Reward: [0.], Done: [False] Step: 116, Reward: [0.], Done: [False] Step: 117, Reward: [0.], Done: [False] Step: 118, Reward: [0.], Done: [False] Step: 119, Reward: [0.], Done: [False] Step: 120, Reward: [0.], Done: [False] Step: 121, Reward: [0.], Done: [False] Step: 122, Reward: [0.], Done: [False] Step: 123, Reward: [0.], Done: [False] Step: 124, Reward: [0.], Done: [False] Step: 125, Reward: [0.], Done: [False] Step: 126, Reward: [0.], Done: [False] Step: 127, Reward: [0.], Done: [False] Step: 128, Reward: [0.], Done: [False] Step: 129, Reward: [0.], Done: [False] Step: 130, Reward: [0.], Done: [False] Step: 131, Reward: [0.], Done: [False] Step: 132, Reward: [0.], Done: [False] Step: 133, Reward: [0.], Done: [False] Step: 134, Reward: [0.], Done: [False] Step: 135, Reward: [0.], Done: [False] Step: 136, Reward: [0.], Done: [False] Step: 137, Reward: [0.], Done: [False] Step: 138, Reward: [0.], Done: [False] Step: 139, Reward: [0.], Done: [False] Step: 140, Reward: [0.], Done: [False] Step: 141, Reward: [0.], Done: [False] Step: 142, Reward: [0.], Done: [False] Step: 143, Reward: [0.], Done: [False] Step: 144, Reward: [0.], Done: [False] Step: 145, Reward: [0.], Done: [False] Step: 146, Reward: [0.], Done: [False] Step: 147, Reward: [0.], Done: [False] Step: 148, Reward: [0.], Done: [False] Step: 149, Reward: [0.], Done: [False] Step: 150, Reward: [0.], Done: [False] Step: 151, Reward: [0.], Done: [False] Step: 152, Reward: [0.], Done: [False] Step: 153, Reward: [0.], Done: [False] Step: 154, Reward: [0.], Done: [False] Step: 155, Reward: [0.], Done: [False] Step: 156, Reward: [0.], Done: [False] Goal reached Traceback (most recent call last): File "generate_solution.py", line 349, in <module> config_filename=args.config_filename, ) File "generate_solution.py", line 208, in solve_scenarios obs, reward, done, info = env.step(action) File "/home/marihan/anaconda3/envs/cr37/lib/python3.7/site-packages/stable_baselines/common/vec_env/base_vec_env.py", line 150, in step return self.step_wait() File "/home/marihan/anaconda3/envs/cr37/lib/python3.7/site-packages/stable_baselines/common/vec_env/vec_normalize.py", line 91, in step_wait obs, rews, news, infos = self.venv.step_wait() File "/home/marihan/commonroad-rl/commonroad_rl/utils_run/vec_env.py", line 40, in step_wait self.on_reset(self.envs[env_idx], elapsed_time) File "generate_solution.py", line 180, in on_reset_callback solution_valid = create_solution(env, solution_path, cost_function, computation_time=elapsed_time) File "generate_solution.py", line 93, in create_solution list_state.append(State(**kwarg)) TypeError: __init__() got an unexpected keyword argument 'acceleration'
I don’t understand why it says “Loading a model without an environment, this model cannot be trained until it has a valid environment.”
and why is the reward all 0 , and lastly how to fix this TypeError: init() got an unexpected keyword argument ‘acceleration’
Dear Marihan,
which commonroad-io version are you using?
Can you please check the init function of the State class. It should contain an “acceleration” kwarg.
Best,
Philipp
1 Like
thank you for your quick reply
I am using commonroad 2022.3