Closed Zackly23 closed 10 months ago
Hi, please try commenting out this line: https://github.com/Pi-Star-Lab/RESCO/blob/main/resco_benchmark/multi_signal.py#L75 It was added for compatibility with another library. I'll see about a proper fix if commenting it out works here for you. Please let me know!
Hi jault, thanks for the response I am following your instruction by commenting out line 75 of multi_signal and trying to rerun the agent, but it gives me an error like this
Traceback (most recent call last):
File "C:/Users/hp/Downloads/RESCO-V2/RESCO-main/resco_benchmark/main.py", line 109, in <module>
main()
File "C:/Users/hp/Downloads/RESCO-V2/RESCO-main/resco_benchmark/main.py", line 36, in main
run_trial(args, args.tr)
File "C:/Users/hp/Downloads/RESCO-V2/RESCO-main/resco_benchmark/main.py", line 85, in run_trial
log_dir=args.log_dir, libsumo=args.libsumo, warmup=map_config['warmup'])
File "C:\Users\hp\Downloads\RESCO-V2\RESCO-main\resco_benchmark\multi_signal.py", line 83, in __init__
self.action_space.append(gym.spaces.Discrete(len(self.phases[ts])))
KeyError: 'top_mgr'
it seems like self.phases does not have a key attribute of top_mgr.
Thank you
Hello @Zackly23, try this, it may work:
for ts in observations:
o_shape = observations[ts].shape
self.obs_shape[ts] = o_shape
o_shape = gym.spaces.Box(low=-np.inf, high=np.inf, shape=o_shape)
self.ts_order.append(ts)
self.observation_space.append(o_shape)
if ts == 'top_mgr' or ts == 'bot_mgr': continue # Not a traffic signal
self.action_space.append(gym.spaces.Discrete(len(self.phases[ts])))
meaning move https://github.com/Pi-Star-Lab/RESCO/blob/main/resco_benchmark/multi_signal.py#L75 before this acttion self.action_space.append(gym.spaces.Discrete(len(self.phases[ts])))
that is https://github.com/Pi-Star-Lab/RESCO/blob/main/resco_benchmark/multi_signal.py#L81 ,
I dont know how correct is this fix, I am running some experiments too and it is running after this change. Hope it will help you too. I will make pull request later with all changes and little bugs I found
Hi, Thanks for the code you shared
I try to run FMA2C agent with the available environment and its gives me an error about the 'top_mgr' like below
I am trying to fix it by changing obs_act in fma2c line 48 by
but, its gives me another error like this
Thank You