Closed blueboy09 closed 6 years ago
Hi,
Lets do some debugging:
@TalhaAsmal Thanks a lot!
4.1 Basic system information: Ubuntu 16.04.3 LTS, Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz, GPU: TITAN Xp 4.2 It happens about 7 minutes after I start the program when it calls the function "train_and_test" (in hypersearch.py) and calls function "self.run_deterministic(runner, print_results=True)" (in btc_env) at the first time.
It seems that a possible reason is "next_start" in "runner.agent.act(next_state, deterministic=True)" is not right. It outputs as follows. But I do not know what the correct form is.
{'series': array([[[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]],
[[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]],
[[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]],
...,
[[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,
0.00000000e+00, 0.00000000e+00, -3.19445158e-08]],
[[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,
0.00000000e+00, 0.00000000e+00, -2.96627647e-08]],
[[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, ...,
0.00000000e+00, 0.00000000e+00, -2.75439958e-08]]]), 'stationary': [0.3, 0.3, 0.0]}
@TalhaAsmal I forgot to mention one thing. I made a small modification. Actually, if I directly run "python hypersearch.py", it has "connection is closed" error. It seems that the self.conn closed in the process because of some unknown reason. I modify line 269 in btc_env as follows.
271 conn = data.engine.connect()
272 try:
273 self.row_ct = data.count_rows(conn, arbitrage=self.hypers.arbitrage)
274 except:
275 import traceback
276 print(traceback.extract_stack())
277 finally:
278 conn.close()
@blueboy09 I am facing the same issue as the connection is closed. i am doing the same things to make the engine connect again, then the "AttributeError: 'NoneType' object has no attribute 'run'" is coming out.
How to fix this problem?
@hkfreenet @blueboy09 Please have a look at issue #10 . I experienced the 'connection is closed' issue as well, and it was resolved with an update to tensorforce. There was no need to change the code in any way.
@TalhaAsmal Thanks a lot! It works. Actually, the current master of tensorforce also changed a lot and does not work. It would be better to specify the committed version (e.g., f1c49de3) of tensorforce in requirement.txt.
I just run the "python hypersearch.py" directly and get the following error. Actually, I find that "self.monitored_session.run" have repeated many times and finally it got a None. I am not familiar with tensorforce and do not know what happened. Any help is appreciated.