mschrader15 / reinforcement-learning-sumo

Reinforcement Learning + traffic microsimulation (via SUMO). Uses Ray RLLIB and forces SUMO into the OpenAI Gym Framework
https://maxschrader.io/reinforcement-learning-and-sumo
44 stars 8 forks source link

Make code compatible with ray>=1.13.0 #6

Open mschrader15 opened 2 years ago

mschrader15 commented 2 years ago

You need to have ray<=1.12.0 installed. Ray made large updates to their codebase in 1.13.0.

You are also welcome to find the equivalent function in 1.13.0 and make a PR!

Originally posted by @mschrader15 in https://github.com/mschrader15/reinforcement-learning-sumo/issues/5#issuecomment-1163166145

TrinhTuanHung2021 commented 1 year ago

You need to have ray<=1.12.0 installed. Ray made large updates to their codebase in 1.13.0.

You are also welcome to find the equivalent function in 1.13.0 and make a PR!

Originally posted by @mschrader15 in #5 (comment)

Hello. Did you run this model?

I had errors when running it File "/home/osboxes/Desktop/reinforcement-learning-sumo/rl_sumo/helpers/preprocessing.py", line 17, in get_parameters with open(input_object, 'rb') as f: TypeError: expected str, bytes or os.PathLike object, not NoneType

mschrader15 commented 1 year ago

Can you share how you are trying to run? Are you following the example in https://github.com/mschrader15/reinforcement-learning-sumo/tree/main/example ?

In full transparency, I haven't worked on this project in over a year and a half. There are likely errors that I welcome having you fix, just create a PR!

TrinhTuanHung2021 commented 1 year ago

Can you share how you are trying to run? Are you following the example in https://github.com/mschrader15/reinforcement-learning-sumo/tree/main/example ?

In full transparency, I haven't worked on this project in over a year and a half. There are likely errors that I welcome having you fix, just create a PR!

Thank you for your quick reply! I followed your instructions with requirement.txt (ray==1.12.0) and I run python train.py --config_path example/setting-files/ES_4_25.json

Errrors

File "/home/osboxes/anaconda3/envs/H3.8/lib/python3.8/site-packages/ray/rllib/utils/deprecation.py", line 42, in deprecation_warning raise DeprecationWarning(msg) DeprecationWarning: get_agent_class has been deprecated. Use ray.rllib.agents.registry::get_trainer_class() instead.

TrinhTuanHung2021 commented 1 year ago

I downgraded ray to 1.11.0 and the model can run.