IBM / rl-testbed-for-energyplus

Reinforcement Learning Testbed for Power Consumption Optimization using EnergyPlus
MIT License
186 stars 77 forks source link

Direct crashing #11

Closed khoderj closed 5 years ago

khoderj commented 5 years ago

I have the following error directly when start training:

Logging to /tmp/openai-2018-12-14-17-33-59-801111 2018-12-14 17:34:03.647273: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA train: init logger with dir=/home/khoder/eplog/openai-2018-12-14-17-34-03-650416 Logging to /home/khoder/eplog/openai-2018-12-14-17-34-03-650416 /home/khoder/.local/lib/python3.5/site-packages/gym/envs/registration.py:14: PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately. result = entry_point.load(False) Monitor: filename=/home/khoder/eplog/openai-2018-12-14-17-34-03-650416 Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/khoder/Documents/IBM_Research_Fix/rl-testbed-for-energyplus/baselines_energyplus/trpo_mpi/run_energyplus.py", line 58, in main() File "/home/khoder/Documents/IBM_Research_Fix/rl-testbed-for-energyplus/baselines_energyplus/trpo_mpi/run_energyplus.py", line 55, in main train(args.env, num_timesteps=args.num_timesteps, seed=args.seed) File "/home/khoder/Documents/IBM_Research_Fix/rl-testbed-for-energyplus/baselines_energyplus/trpo_mpi/run_energyplus.py", line 50, in train gamma=0.99, lam=0.98, vf_iters=5, vf_stepsize=1e-3) TypeError: learn() takes 0 positional arguments but 2 positional arguments (and 8 keyword-only arguments) were given

I have looked at the signature of the learn method and it seems calling the "trpo_mpi.learn()" method in directory "rl-testbed-for-energyplus/baselines_energyplus/trpo_mpi/run_energyplus.py" doesn't abide by the method signature imported from "baselines" (from baselines.trpo_mpi import trpo_mpi). Thus, I have modified a little bit calling the method but I kept having other errors and I think that maybe I miss something and the error could be handled in another way.

Could you please provide me with some explanations? Thanks in advance .

takaomoriyama commented 5 years ago

Thank you for the report. Yes. The current code assumes bit old version of the baseline. The signature of trpo_mpi.lean() was update in the following commit:

    commit 8c2aea2addc9f3ba36d4a0c937e6a2d09830afc7
    Author: pzhokhov <peterzhokhoff@gmail.com>
    Date:   Mon Aug 13 09:56:44 2018 -0700

Please let me consider how to catch up to the latest code, and how to keep consistency between rl-testbed-for-energyplus and baselines.

takaomoriyama commented 5 years ago

Thank you for the report. Yes. The current code assumes bit old version of the baseline. The signature of trpo_mpi.lean() was update in the following commit:

    commit 8c2aea2addc9f3ba36d4a0c937e6a2d09830afc7
    Author: pzhokhov <peterzhokhoff@gmail.com>
    Date:   Mon Aug 13 09:56:44 2018 -0700

Please let me consider how to catch up to the latest code, and how to keep consistency between rl-testbed-for-energyplus and baselines.

khoderj commented 5 years ago

Thank you for your reply. Actually, downloading the baselines' version directly before the commit you mentioned has solved the problem:

Shivanshmundra commented 5 years ago

Does this error has any alternative solution?

Ryan-Johnson-1315 commented 4 years ago

I am getting the same problem. I have checked out both commits in baseline and am still having the same problem

takaomoriyama commented 4 years ago

One of solutions might be to adapt rl-testbed-for-energyplus to the latest version of the baseline code. I'm wondering which version baselines is appropriate to pursue; OpenAI baselines or stable-baselines. Any idea ?