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

unexpected keyword argument 'states_spec' #1

Open
ahotrod opened this issue May 21, 2019 · 2 comments
Open

unexpected keyword argument 'states_spec' #1

ahotrod opened this issue May 21, 2019 · 2 comments

Comments

@ahotrod
Copy link

ahotrod commented May 21, 2019

Thanks for sharing your TAA-PG project.

running train.py (and test.py) I get this error message which I've not been able to solve:

Traceback (most recent call last):
File "./train.py", line 394, in
run = TrainAgent(arguments)
File "./train.py", line 256, in init
summary_spec=self.summary_spec
File "/media/dn/dssd/tensorforce_g/tensorforce/agents/agent.py", line 286, in from_spec
kwargs=kwargs
File "/media/dn/dssd/tensorforce_g/tensorforce/util.py", line 198, in get_object
return obj(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'states_spec'

Any ideas or suggestions for a fix?

Thanks again.

@SvenBecker
Copy link
Owner

SvenBecker commented May 21, 2019 via email

@ahotrod
Copy link
Author

ahotrod commented May 22, 2019

Thanks Sven, that was the problem. I had Tensorforce version 0.4.3 installed. Downgraded it and the 'states_spec' problem went away.

There were follow-on problems similar in nature to the 'states-spec' problem, so I "bit the bullet" and created a new virtual conda environment strictly adhering to your dependencies list. CPU training seemed to work, but slowly. So thinking I'd configure TAA-PG to run on my Nvidia GTX1080Ti GPU, I had to downgrade CUDAtoolkit to version 8 and cuDNN to version 6 for compatibility with TensorFlow 1.4.0.

Now I think running on the GTX1080Ti GPU may be slower than running just on the 12 CPU threads of my computer's Intel® Core™ i7-8700. In CPU-only mode, all 12 CPUs threads are utilized approximately 35% when running your TAA-PG app. I read that most RL/DL apps require particularly excessive back & forth transfers between CPU & GPU memory and the associated overhead negates the usual parallel processing advantages of a GPU. I then saw that Tensorforce versions 0.4 & 0.5 were/are planned to be improved to better utilize GPUs. Then there's Tensorflow 2.0 on the horizon and it may be a long while before Tensorforce is compatible … on & on … it's hard to keep-up with the changes. Hopefully the changes will settle-out soon and the changes do benefit RL/DL apps.

Thanks again, I now look forward to digging into the inner workings of your TAA-PG.

Best,
Dennis

UPDATE: Converted 'model/agent_config/ppo_sb.json' to the latest Tensorforce version 0.4.3 format to run with TensorFlow-gpu 1.13.1, CUDAtoolkit 10.0.130, and cuDNN 7.3.1. CPU-only execution time is now approximately 40% less than the execution time of the TensorFlow 1.4.0 - TensorForce 0.3.51 environment. GPU execution takes 4x the time of CPU-only execution, with approximately 35% utilization of the GPU and approx. 15% utilization of the 12 CPU threads . The system must be overwhelmed and considerably delayed with CPU-GPU memory transfers. So I'll go with CPU-only execution and focus on the RL/DL models.

scikit-learn ver 0.21.1 is flooding my screen with "Userwarning: Numerical issues were encountered when scaling the data and might not be solved. The standard deviation of the data is probably very close to 0." Earlier scikit-learn ver 0.19.1 was spitting out the same warning, but not the shear volume of ver 0.21.1. I silenced the warnings, but probably need to investigate further.

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

2 participants