Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data KeyError when run dqn_model.py #14

Open
zhengwsh opened this issue Sep 21, 2017 · 3 comments
Open

Data KeyError when run dqn_model.py #14

zhengwsh opened this issue Sep 21, 2017 · 3 comments

Comments

@zhengwsh
Copy link

I followed the tutorial and download the data into the correct folder, however when i run the model it occurs that data_dict has keyerror. I sincerely hope you teach me how to deal with this problem.

Traceback (most recent call last):
File "/home/vinson/Desktop/deep_trader-master/tensor-reinforcement/dqn_model.py", line 11, in
from train_stock import *
File "/home/vinson/Desktop/deep_trader-master/tensor-reinforcement/train_stock.py", line 23, in
supervised_y_data = episodic_data.make_supervised_data(data, data_dict)
File "/home/vinson/Desktop/deep_trader-master/tensor-reinforcement/episodic_data.py", line 99, in make_supervised_data
supervised_data.append(episode_supervised_data(episode, data_dict))
File "/home/vinson/Desktop/deep_trader-master/tensor-reinforcement/episodic_data.py", line 86, in episode_supervised_data
prices.append(data_average_price(data_dict, iteration))
File "/home/vinson/Desktop/deep_trader-master/tensor-reinforcement/episodic_data.py", line 91, in data_average_price
data = data_dict[list_md5_string_value(data)]
KeyError: '297956b2300474fda50a2a6b1d41a714'

@joaosalvado10
Copy link

Hello, I've got the same error.
Any solution at the moment?

@lamuguo
Copy link

lamuguo commented Nov 15, 2017

@deependersingla
After some investigation, I think what we need is 'tensor-reinforcement/NIFTY50.csv'. Based on this, by using prepare_data(), we can generate data.pkl and data_dict.pkl on our side. Current data.pkl / data_dict.pkl doesn't match each other, I guess it has version issue.

Please take a look. Thanks!

lamuguo pushed a commit to lamuguo/deep_trader that referenced this issue Nov 17, 2017
KeyError: '297956b2300474fda50a2a6b1d41a714'
 👍 2
@lamuguo
Copy link

lamuguo commented Nov 17, 2017

I did some investigation, looks we may need to use "cPickle" directly instead of "six.moves.cPickle". Corresponding PR is #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants