usail-hkust / LLMTSCS

Official code for article "LLMLight: Large Language Models as Traffic Signal Control Agents".
166 stars 21 forks source link

run_advanced_mplight.py 报错 #26

Open baibingren opened 2 days ago

baibingren commented 2 days ago

Process Process-1: Traceback (most recent call last): File "/home/mellon/anaconda3/envs/llmlight/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/home/mellon/anaconda3/envs/llmlight/lib/python3.9/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/home/mellon/mellon/repo/LLMTSCS/utils/utils.py", line 33, in pipeline_wrapper round_results = ppl.run(round=i, multi_process=False) File "/home/mellon/mellon/repo/LLMTSCS/utils/pipeline.py", line 155, in run generator_wrapper(cnt_round=cnt_round, File "/home/mellon/mellon/repo/LLMTSCS/utils/pipeline.py", line 69, in generator_wrapper generator = Generator(cnt_round=cnt_round, File "/home/mellon/mellon/repo/LLMTSCS/utils/generator.py", line 30, in init agent = DIC_AGENTS[agent_name]( File "/home/mellon/mellon/repo/LLMTSCS/models/network_agent.py", line 35, in init self.q_network = self.build_network() File "/home/mellon/mellon/repo/LLMTSCS/models/advanced_mplight_agent.py", line 28, in build_network _p = Activation('sigmoid')(Embedding(2, 4, input_length=8)(dic_input_node["feat1"])) File "/home/mellon/anaconda3/envs/llmlight/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/mellon/anaconda3/envs/llmlight/lib/python3.9/site-packages/google/protobuf/internal/containers.py", line 70, in getitem return self._values[key] TypeError: list indices must be integers or slices, not str traffic finish join 0

我本地运行run_advanced_mplight.py时报这个错误,是什么包的版本不对吗?

SQLai2099 commented 2 days ago

不好意思,我没遇到过这个错。请检查包的版本并尝试用debug模式找一下原因。