Kismuz / btgym

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

Running example LSTM and encounting error : 'TypeError: __init__() got an unexpected keyword argument 'global_step_op'' #58

Closed samischyvinck closed 6 years ago

samischyvinck commented 6 years ago

When I run the stacked Lstm example, I keep receiving this error: TypeError: init() got an unexpected keyword argument 'global_step_op'

Hi, First of all thank you for this amazing library! When I am running the stacked LSTM example (unreal_stacked_lstm_strat_4_11) I keep receiving the error stated beneath. I can't figure out what exactly is going wrong. I hope you can direct me where to look?

Thanks in advance!

Running environment:

Mac os x 10.13.4, Python 3.6.2

Full stack of the error:

110023: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:324] Started server with target: grpc://localhost:12232 E0717 10:31:03.125095000 140735818789760 ev_epollex_linux.cc:1482] Skipping epollex becuase GRPC_LINUX_EPOLL is not defined. E0717 10:31:03.136772000 140735818789760 ev_epoll1_linux.cc:1261] Skipping epoll1 becuase GRPC_LINUX_EPOLL is not defined. E0717 10:31:03.138984000 140735818789760 ev_epollsig_linux.cc:1761] Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined. 2018-07-17 10:31:03.139190: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA 2018-07-17 10:31:03.153255: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job ps -> {0 -> 127.0.0.1:12230} 2018-07-17 10:31:03.153887: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job worker -> {0 -> 127.0.0.1:12231, 1 -> 127.0.0.1:12232, 2 -> localhost:12233, 3 -> 127.0.0.1:12234, 4 -> 127.0.0.1:12235, 5 -> 127.0.0.1:12236} E0717 10:31:03.154992000 140735818789760 ev_epollex_linux.cc:1482] Skipping epollex becuase GRPC_LINUX_EPOLL is not defined. 2018-07-17 10:31:03.155717: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:324] Started server with target: grpc://localhost:12233 E0717 10:31:03.159105000 140735818789760 ev_epoll1_linux.cc:1261] Skipping epoll1 becuase GRPC_LINUX_EPOLL is not defined. E0717 10:31:03.171827000 140735818789760 ev_epollsig_linux.cc:1761] Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined. 2018-07-17 10:31:03.178958: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job ps -> {0 -> 127.0.0.1:12230} 2018-07-17 10:31:03.183414: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job worker -> {0 -> 127.0.0.1:12231, 1 -> 127.0.0.1:12232, 2 -> 127.0.0.1:12233, 3 -> 127.0.0.1:12234, 4 -> localhost:12235, 5 -> 127.0.0.1:12236} 2018-07-17 10:31:03.187496: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA 2018-07-17 10:31:03.188180: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:324] Started server with target: grpc://localhost:12235 E0717 10:31:03.191466000 140735818789760 ev_epollex_linux.cc:1482] Skipping epollex becuase GRPC_LINUX_EPOLL is not defined. E0717 10:31:03.192298000 140735818789760 ev_epoll1_linux.cc:1261] Skipping epoll1 becuase GRPC_LINUX_EPOLL is not defined. E0717 10:31:03.196005000 140735818789760 ev_epollsig_linux.cc:1761] Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined. 2018-07-17 10:31:03.206337: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job ps -> {0 -> 127.0.0.1:12230} 2018-07-17 10:31:03.207088: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job worker -> {0 -> 127.0.0.1:12231, 1 -> 127.0.0.1:12232, 2 -> 127.0.0.1:12233, 3 -> localhost:12234, 4 -> 127.0.0.1:12235, 5 -> 127.0.0.1:12236} 2018-07-17 10:31:03.208999: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA 2018-07-17 10:31:03.210159: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:324] Started server with target: grpc://localhost:12234 E0717 10:31:03.216696000 140735818789760 ev_epollex_linux.cc:1482] Skipping epollex becuase GRPC_LINUX_EPOLL is not defined. E0717 10:31:03.217088000 140735818789760 ev_epoll1_linux.cc:1261] Skipping epoll1 becuase GRPC_LINUX_EPOLL is not defined. E0717 10:31:03.218253000 140735818789760 ev_epollsig_linux.cc:1761] Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined. 2018-07-17 10:31:03.219322: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job ps -> {0 -> 127.0.0.1:12230} 2018-07-17 10:31:03.219701: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job worker -> {0 -> 127.0.0.1:12231, 1 -> 127.0.0.1:12232, 2 -> 127.0.0.1:12233, 3 -> 127.0.0.1:12234, 4 -> 127.0.0.1:12235, 5 -> localhost:12236} 2018-07-17 10:31:03.220641: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:324] Started server with target: grpc://localhost:12236 Process BTgymServer-3:1: Traceback (most recent call last): File "//anaconda/envs/tensorflow/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap self.run() File "/Users/Sami/btgym/btgym/server.py", line 471, in run self.socket.bind(self.network_address) File "zmq/backend/cython/socket.pyx", line 547, in zmq.backend.cython.socket.Socket.bind File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc zmq.error.ZMQError: Address already in use [2018-07-17 08:31:04.298996] NOTICE: UNREAL_2: learn_rate: 0.000100, entropy_beta: 0.010000 [2018-07-17 08:31:04.310366] NOTICE: UNREAL_4: learn_rate: 0.000100, entropy_beta: 0.010000 [2018-07-17 08:31:04.326895] NOTICE: UNREAL_5: learn_rate: 0.000100, entropy_beta: 0.010000 [2018-07-17 08:31:04.356204] NOTICE: UNREAL_3: learn_rate: 0.000100, entropy_beta: 0.010000 [2018-07-17 08:31:17.719655] ERROR: UNREAL_0: Base class init() exception occurred.

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

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 481, in init self.runners = self._make_runners(policy=pi) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 793, in _make_runners runners.append(self.runner_config'class_ref') TypeError: init() got an unexpected keyword argument 'global_step_op' [2018-07-17 08:31:17.722455] ERROR: UNREAL_0: Child class Unreal init() exception occurred

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

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 481, in init self.runners = self._make_runners(policy=pi) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 793, in _make_runners runners.append(self.runner_config'class_ref') TypeError: init() got an unexpected keyword argument 'global_step_op'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 1499, in init super(Unreal, self).init(name='UNREAL', **kwargs) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 497, in init raise RuntimeError(msg) RuntimeError: Base class init() exception occurred.

Press Ctrl-C or jupyter:[Kernel]->[Interrupt] for clean exit. [2018-07-17 08:31:25.113103] ERROR: UNREAL_4: Base class init() exception occurred.

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

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 481, in init self.runners = self._make_runners(policy=pi) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 793, in _make_runners runners.append(self.runner_config'class_ref') TypeError: init() got an unexpected keyword argument 'global_step_op' [2018-07-17 08:31:25.116151] ERROR: UNREAL_4: Child class Unreal init() exception occurred

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

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 481, in init self.runners = self._make_runners(policy=pi) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 793, in _make_runners runners.append(self.runner_config'class_ref') TypeError: init() got an unexpected keyword argument 'global_step_op'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 1499, in init super(Unreal, self).init(name='UNREAL', **kwargs) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 497, in init raise RuntimeError(msg) RuntimeError: Base class init() exception occurred.

Press Ctrl-C or jupyter:[Kernel]->[Interrupt] for clean exit. [2018-07-17 08:31:25.125871] ERROR: UNREAL_2: Base class init() exception occurred.

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

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 481, in init self.runners = self._make_runners(policy=pi) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 793, in _make_runners runners.append(self.runner_config'class_ref') TypeError: init() got an unexpected keyword argument 'global_step_op' [2018-07-17 08:31:25.127582] ERROR: UNREAL_2: Child class Unreal init() exception occurred

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

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 481, in init self.runners = self._make_runners(policy=pi) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 793, in _make_runners runners.append(self.runner_config'class_ref') TypeError: init() got an unexpected keyword argument 'global_step_op'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 1499, in init super(Unreal, self).init(name='UNREAL', **kwargs) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 497, in init raise RuntimeError(msg) RuntimeError: Base class init() exception occurred.

Press Ctrl-C or jupyter:[Kernel]->[Interrupt] for clean exit. [2018-07-17 08:31:25.177571] ERROR: UNREAL_5: Base class init() exception occurred.

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

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 481, in init self.runners = self._make_runners(policy=pi) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 793, in _make_runners runners.append(self.runner_config'class_ref') TypeError: init() got an unexpected keyword argument 'global_step_op' [2018-07-17 08:31:25.178623] ERROR: UNREAL_5: Child class Unreal init() exception occurred

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

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 481, in init self.runners = self._make_runners(policy=pi) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 793, in _make_runners runners.append(self.runner_config'class_ref') TypeError: init() got an unexpected keyword argument 'global_step_op'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 1499, in init super(Unreal, self).init(name='UNREAL', **kwargs) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 497, in init raise RuntimeError(msg) RuntimeError: Base class init() exception occurred.

Press Ctrl-C or jupyter:[Kernel]->[Interrupt] for clean exit. [2018-07-17 08:31:25.195126] ERROR: UNREAL_3: Base class init() exception occurred.

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

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 481, in init self.runners = self._make_runners(policy=pi) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 793, in _make_runners runners.append(self.runner_config'class_ref') TypeError: init() got an unexpected keyword argument 'global_step_op' [2018-07-17 08:31:25.196144] ERROR: UNREAL_3: Child class Unreal init() exception occurred

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

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 481, in init self.runners = self._make_runners(policy=pi) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 793, in _make_runners runners.append(self.runner_config'class_ref') TypeError: init() got an unexpected keyword argument 'global_step_op'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 1499, in init super(Unreal, self).init(name='UNREAL', **kwargs) File "/Users/Sami/btgym/btgym/algorithms/aac.py", line 497, in init raise RuntimeError(msg) RuntimeError: Base class init() exception occurred.

Press Ctrl-C or jupyter:[Kernel]->[Interrupt] for clean exit. [2018-07-17 08:32:34.286588] ERROR: BTgymAPIshell_1: Server unreachable with status: . [2018-07-17 08:32:34.287550] ERROR: Worker_1: failed to make BTGym environment at port_5001. Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/worker.py", line 188, in run env_kwargs File "/Users/Sami/btgym/btgym/envs/backtrader.py", line 387, in init self._start_server() File "/Users/Sami/btgym/btgym/envs/backtrader.py", line 500, in _start_server raise ConnectionError(msg) ConnectionError: Server unreachable with status: . Process Worker-3: Traceback (most recent call last): File "/Users/Sami/btgym/btgym/algorithms/worker.py", line 188, in run env_kwargs File "/Users/Sami/btgym/btgym/envs/backtrader.py", line 387, in init self._start_server() File "/Users/Sami/btgym/btgym/envs/backtrader.py", line 500, in _start_server raise ConnectionError(msg) ConnectionError: Server unreachable with status: .

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "//anaconda/envs/tensorflow/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap self.run() File "/Users/Sami/btgym/btgym/algorithms/worker.py", line 200, in run raise RuntimeError RuntimeError

Kismuz commented 6 years ago

@samischyvinck , working on it please wait

Kismuz commented 6 years ago

@samischyvinck , update, should be fixed