deep-trading-agent icon indicating copy to clipboard operation
deep-trading-agent copied to clipboard

ERROR: INVALID_TIMESTEP

Open arunavo4 opened this issue 6 years ago • 1 comments

Traceback (most recent call last): File "/home/arunavo/PycharmProjects/samre12Trading/trader/main.py", line 47, in main("/home/arunavo/PycharmProjects/samre12Trading/trader/agent/config/config.cfg") File "/home/arunavo/PycharmProjects/samre12Trading/trader/main.py", line 37, in main agent.train() File "/home/arunavo/PycharmProjects/samre12Trading/trader/agent/model/train.py", line 69, in train self.replay_memory.set_history(state, supplementary) File "/home/arunavo/PycharmProjects/samre12Trading/trader/agent/model/replay_memory.py", line 107, in set_history self.add(state[length - 1], 0.0, 0, False, supp) File "/home/arunavo/PycharmProjects/samre12Trading/trader/agent/model/replay_memory.py", line 53, in add raise ValueError(INVALID_TIMESTEP) ValueError: INVALID_TIMESTEP ERROR:deep_trading_agent:Invalid Timestep with shapes (4,), (1,)

Process finished with exit code 1

/// In file : train.py def train(self): ............

    state, supplementary = self.env.reset()
    self.history.set_history(state)
    self.replay_memory.set_history(state, supplementary)

#env.reset() //returns -->> return self.historical_prices[self.current - self.history_length:self.current], np.array([1.0])

from file: cryptoenv.py //its an np.array.shape --> 1 whereas supplementary needs 27 according to the config file

P.S: for branch adaptive_normalization

arunavo4 avatar Jun 30 '18 06:06 arunavo4

@arunavo4 sorry for the delayed response, I will look into the issue ASAP.

samre12 avatar Aug 08 '18 05:08 samre12