Pi-Star-Lab / RESCO

Reinforcement Learning Benchmarks for Traffic Signal Control (RESCO)
116 stars 36 forks source link

'STOCHASTICAgent' object has no attribute 'save' #1

Open gtilg opened 2 years ago

gtilg commented 2 years ago

Hi,

first of all - thanks a lot for this code!

Both my python skills and reinforcement skills are yet under development. However, when I run a standard scenario from the "main.py" file with a stochastic agent (and in my case the Ingolstadt 7 scenario), I get the following AttributeError:

'STOCHASTICAgent' object has no attribute 'save'

Indeed, I didnt find such method (neither in agents/stochastic.py, nor in the agents.agent.py).

I know I could add such a method, but any help on how to actually do the "save" is very much appreciated.

Thank you! Gabriel

jault commented 2 years ago

Hi Gabriel, thanks for bringing this to our attention.

This could be addressed through python random's getstate() and setstate() functions (along with saving to disk via pickle). https://docs.python.org/3/library/random.html We'll include this as soon as possible.