-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
setting_up_environment_basic fails on python 3.6, Windows 7 #17
Comments
Hmm... At very first glance it seems to be issue with the difference in Windows multiprocessing implementation. Since btgym has not been tested with Win, I need time to investigate it till I can fix it. |
I spent some time to look into this since I am using windows. It turned out this has nothing to do with multiprocessing and it's the lock used in logging.Logger which cannot be pickled on windows ( I think this might be related to some platform dependent implementation of lock, but I didn't dig deeper). I found that using logger from logbook instead of python default logging module can workaround this issue and run the setting_up_environment_basic.ipynb to the end. In the last step of that notebook, it will run a few steps (1500 - 2000), output some plots, and then it will raise the following error: Resource temporarily unavailable. And this happens both on my windows and linux (ubuntu 14.04 LTS) systems. My python version is 3.6.2 Again Traceback (most recent call last) c:\programdata\anaconda3\envs\btgym-env\lib\site-packages\gym\core.py in render(self, mode, close) c:\study\btgym\btgym\envs\backtrader.py in _render(self, mode, close) c:\programdata\anaconda3\envs\btgym-env\lib\site-packages\zmq\sugar\socket.py in recv_pyobj(self, flags) zmq\backend\cython\socket.pyx in zmq.backend.cython.socket.Socket.recv() zmq\backend\cython\socket.pyx in zmq.backend.cython.socket.Socket.recv() zmq\backend\cython\socket.pyx in zmq.backend.cython.socket._recv_copy() zmq\backend\cython\socket.pyx in zmq.backend.cython.socket._recv_copy() c:\programdata\anaconda3\envs\btgym-env\lib\site-packages\zmq\backend\cython\checkrc.pxd in zmq.backend.cython.checkrc._check_rc() Again: Resource temporarily unavailable |
@mysl ,
|
That's rather strange. Unfortunately I don't have Win installed to replicate it.
...and do manual kill. Note, that when running A3C examples there are also 12230 and 12231 to watch for. Usually it throws errors like:
One more things: it has been a os-specific lurking rendering error, fixed today, related to episode rendering, worth checking here, bottom: #24 |
@Kismuz thanks for reply. I will update the code and have a try when I have a chance. BTW, there is another 'incompatibility' with windows, this file https://github.com/Kismuz/btgym/blob/master/examples/data/test_bent_sine_1min_period_300%3E1500_delta0002.csv, it has a character '>' which is invalid for file name, and makes my checkout always fail. Would you pls fix that ? thanks! |
done |
I updated to latest code, it seems not helping. And this time, the More control section in the notebook raised exception as follows. It looks it's somehow blocked when the environment is trying closing. ============================================================= Env.strategy: <class 'btgym.strategy.base.BTgymBaseStrategy'> Env.engine: <backtrader.cerebro.Cerebro object at 0x000000EE83F49F60> Env.renderer: <btgym.rendering.renderer.BTgymRendering object at 0x000000EEF8D65630> Env.network_address: tcp://127.0.0.1:5555 Parameters [engine]: Parameters [dataset]: Parameters [strategy]: Parameters [render]:
|
It looks there might be a long way to go to support running btgym on windows. I might need to switch to linux. Thanks anyway! |
@mysl , |
@Kismuz thanks, tried the force_data_server_shutdown, it looks the issue that environment.close failed resolved. But in the last step of running the agent, there is an AssertionError. I checked the console running the jupyter kernel, it shows some pickling error of pandas dataframe, which I guess might be the reason for the AssertionError. ========================================================== |
draw_episode() again... |
yeah, I got episode rendering under windows the first time I posted in this thread. It will output several plots and raise the resource unavailable error. See my previous response, there is a picture attached there. |
At picture attached there is https://github.com/Kismuz/btgym/blob/master/examples/img/2017-11-24_18.37.50.png |
then NO |
...than it definitely was draw_cerebro() right from the start. Pickle serialisation error when starting DrawCerebro subprocess. Exactly, it fails to serialise pandas.dataframe object and latter can only be found inside cerebro instance containing final episode data. Something similar to logger issue; Win specific. Have to figure how to sort it out. |
Switched entire package to |
Closed due to long inactivity period. |
The text was updated successfully, but these errors were encountered: