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

Not sure if incompatible with baselines or bad baselines installation #13

Open
rwill128 opened this issue Feb 4, 2018 · 4 comments
Open

Comments

@rwill128
Copy link

rwill128 commented Feb 4, 2018

I'm getting the following error when I run enjoy_mineral_shards. I didn't exactly have a seamless baselines installation, but I think baselines is installed correctly now and not the problem.

C:\Users\Rick\Desktop\pysc2-examples>python enjoy_mineral_shards.py
Traceback (most recent call last):
File "enjoy_mineral_shards.py", line 162, in
main()
File "enjoy_mineral_shards.py", line 55, in main
"mineral_shards.pkl", act_params=act_params)
File "C:\Users\Rick\Desktop\pysc2-examples\deepq_mineral_shards.py", line 93, in load
return ActWrapper.load(path, num_cpu=num_cpu, act_params=act_params)
File "C:\Users\Rick\Desktop\pysc2-examples\deepq_mineral_shards.py", line 44, in load
act = deepq.build_act(**act_params)
File "c:\users\rick\desktop\baselines\baselines\deepq\build_graph.py", line 146, in build_act
observations_ph = make_obs_ph("observation")
File "enjoy_mineral_shards.py", line 46, in make_obs_ph
return U.BatchInput((64, 64), name=name)
AttributeError: module 'baselines.common.tf_util' has no attribute 'BatchInput'
W0204 12:41:43.175422 10984 sc_process.py:183] Killing the process.

@rwill128
Copy link
Author

rwill128 commented Feb 5, 2018

It seems like baseline is installed correctly. It's finding the dependency in tf_util, but my version of tf_util has no such method called "BatchInput".

I looked in Git history for baselines, and that file appears to have never had a method called "BatchInput", which is puzzling to me.

I also cannot find a method in tf_util that appears to have analogous functionality. Any clues as to why this code is calling tf_util.BatchInput when that method doesn't exist?

@brean
Copy link

brean commented Feb 6, 2018

BatchInput was part of baselines/common/tf_util.py since its last cleanup-commit (take a look at this change). I guess it moved to baselines/deepq/utils.py (see here)

Using load_state and BatchInput from baselines.deepq.utils seems to work fine.

@rwill128
Copy link
Author

rwill128 commented Feb 6, 2018

Thanks!

@moshebeutel
Copy link

moshebeutel commented Mar 6, 2018

hi
maybe this is related...

while trying to run train_mineal_shards.py I got

Traceback (most recent call last):
File "/home/iaiai/pysc2-examples/train_mineral_shards.py", line 14, in
from a2c.policies import CnnPolicy
File "/home/iaiai/pysc2-examples/a2c/policies.py", line 3, in
from baselines.acktr.utils import conv, fc, dense, conv_to_fc, sample, kl_div
ImportError: cannot import name 'conv'

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