Kismuz / btgym

Scalable, event-driven, deep-learning-friendly backtesting library
https://kismuz.github.io/btgym/
GNU Lesser General Public License v3.0
988 stars 261 forks source link

Atari Example Error #73

Closed JaCoderX closed 5 years ago

JaCoderX commented 6 years ago

@Kismuz first of I would like to thank you for this wonderful project.

I'm following the examples you have on the project. (didn't had any luck running them on windows so switched to linux).

when running the Atari examples I get the following error:

[2018-11-03 07:46:07.161530] ERROR: A3C_0: expected environment observation space of type <class 'btgym.spaces.ActionDictSpace'>, got: <class 'gym.spaces.discrete.Discrete'> Traceback (most recent call last): File "/home/jack/btgym/btgym/algorithms/aac.py", line 248, in init assert isinstance(self.ref_env.action_space, BaseAcSpace) AssertionError [2018-11-03 07:46:07.162246] ERROR: A3C_0: Base class init() exception occurred.

Press Ctrl-C or jupyter:[Kernel]->[Interrupt] for clean exit.

Traceback (most recent call last): File "/home/jack/btgym/btgym/algorithms/aac.py", line 248, in init assert isinstance(self.ref_env.action_space, BaseAcSpace) AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/jack/btgym/btgym/algorithms/aac.py", line 255, in init raise AssertionError AssertionError

it seems like the assertion check is expecting the wrapper class for gym.spaces instead of directly the gym class.

I'm new to this project and gym (and RL for that matter), so I'm just pointing out what I see.

Kismuz commented 6 years ago

@JacobHanouna, you"right, atary env wrapper itself has not been midified to provide gym specific action space which has been added recently. thank you for pointing it out.. Will fix.