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

chapter 8: “train_model.py” running failure issue #68

Open
GuilinF opened this issue Feb 7, 2020 · 2 comments
Open

chapter 8: “train_model.py” running failure issue #68

GuilinF opened this issue Feb 7, 2020 · 2 comments

Comments

@GuilinF
Copy link

GuilinF commented Feb 7, 2020

i am running the chapter 8 example. i use the argparse "python train_model.py --year 16 -r RUN"; The "train_model.py” is failure to run by the issue:

Traceback (most recent call last):
File "train_model.py", line 95, in
buffer.populate(1)
File "D:\Anaconda3\lib\site-packages\ptan\experience.py", line 365, in populate
entry = next(self.experience_source_iter)
File "D:\Anaconda3\lib\site-packages\ptan\experience.py", line 173, in iter
for exp in super(ExperienceSourceFirstLast, self).iter():
File "D:\Anaconda3\lib\site-packages\ptan\experience.py", line 53, in iter
obs = env.reset()
File "D:\Anaconda3\lib\site-packages\gym\wrappers\time_limit.py", line 25, in reset
return self.env.reset(**kwargs)
File "D:\pythoncode\Deep-Reinforcement-Learning-Hands-On\Deep-Reinforcement-Learning-Hands-On-master\Chapter08\lib\environ.py", line 302, in reset
self._instrument = self.np_random.choice(list(self._prices.keys()))
File "mtrand.pyx", line 1126, in mtrand.RandomState.choice
ValueError: a must be non-empty

please help me. thanks for your advices

@Shmuma
Copy link
Collaborator

Shmuma commented Feb 7, 2020

Looks like you data is empty. Have you checked that --year arg has proper value?

@GuilinF
Copy link
Author

GuilinF commented Feb 8, 2020

Looks like you data is empty. Have you checked that --year arg has proper value?

yes, i find this empty issue. After read the book,i doesn't find the example argparse just like "python train_model.py --year 16 -r RUN" . So i have the question what is the proper value of --year arg this code?

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

No branches or pull requests

2 participants