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

[es_distributed/ga.py] eval_rews, eval_length = policy.rollout(env) ValueError: too many values to unpack (expected 2) #29

Open
dragon28 opened this issue Jun 18, 2019 · 0 comments

Comments

@dragon28
Copy link

dragon28 commented Jun 18, 2019

Hello People,

I am getting the following error when I run . scripts/local_run_exp.sh ga configurations/frostbite_ga.json, which is the GA experiment

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/dragon/machine_learning/deep-neuroevolution/es_distributed/main.py", line 90, in <module>
    cli()
  File "/home/dragon/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/dragon/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/dragon/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/dragon/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/dragon/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/dragon/machine_learning/deep-neuroevolution/es_distributed/main.py", line 84, in workers
    algo.run_worker(master_redis_cfg, relay_redis_cfg, noise=noise)
  File "/home/dragon/machine_learning/deep-neuroevolution/es_distributed/ga.py", line 230, in run_worker
    eval_rews, eval_length = policy.rollout(env)  # eval rollouts don't obey task_data.timestep_limit
ValueError: too many values to unpack (expected 2)

and I managed to fixed it by changing the following code:

from

deep-neuroevolution/es_distributed/ga.py, line 230:

eval_rews, eval_length = policy.rollout(env) # eval rollouts don't obey task_data.timestep_limit

to:

deep-neuroevolution/es_distributed/ga.py, line 230:

eval_rews, eval_length, _ = policy.rollout(env) # eval rollouts don't obey task_data.timestep_limit

My environment information:
Ubuntu 18.04 x64
Python 3.6.8
tensorflow 1.13.1
Click 7.0
atari-py 0.1.15
numpy 1.16.3
gym 0.12.1
baselines 0.1.5

Thanks

@dragon28 dragon28 changed the title eval_rews, eval_length = policy.rollout(env) ValueError: too many values to unpack (expected 2) [es_distributed/ga.py] eval_rews, eval_length = policy.rollout(env) ValueError: too many values to unpack (expected 2) Jun 18, 2019
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

1 participant