rll / rllab

rllab is a framework for developing and evaluating reinforcement learning algorithms, fully compatible with OpenAI Gym.
Other
2.89k stars 803 forks source link

ImportError: cannot import name 'MemmapingPool' #240

Open ioarun opened 6 years ago

ioarun commented 6 years ago

Hi,

I am getting an error when running the examples:

Traceback (most recent call last): File "rllab/examples/trpo_cartpole.py", line 1, in <module> from rllab.algos.trpo import TRPO File "/home/arun/rbccps/rllab/rllab/algos/trpo.py", line 1, in <module> from rllab.algos.npo import NPO File "/home/arun/rbccps/rllab/rllab/algos/npo.py", line 3, in <module> from rllab.algos.batch_polopt import BatchPolopt File "/home/arun/rbccps/rllab/rllab/algos/batch_polopt.py", line 2, in <module> from rllab.sampler import parallel_sampler File "/home/arun/rbccps/rllab/rllab/sampler/parallel_sampler.py", line 2, in <module> from rllab.sampler.stateful_pool import singleton_pool, SharedGlobal File "/home/arun/rbccps/rllab/rllab/sampler/stateful_pool.py", line 3, in <module> from joblib.pool import MemmapingPool ImportError: cannot import name 'MemmapingPool'

I am running Ubuntu 16.04 and using Python3 to execute the scripts. Please help. Thanks!

AlexZhou1995 commented 6 years ago

Just open rllab/sampler/stateful_pool.py and fix the typo. from joblib.pool import MemmapingPool -> from joblib.pool import MemmappingPool

BarelySentient commented 5 years ago

Frustratingly, one of my machines (both are Ubuntu 18 and using python 2.7.15) works with Memmapping and another works with Memmaping (different number of p's). Is there a way to make both run successfully using synced files?

AlexZhou1995 commented 5 years ago

@BarelySentient I found that joblib==0.11 use Memmaping, while joblib=0.13 fixed this typo and use Memmapping. I guess that one of your machines use 0.13 version and others use 0.11 version.

So you can try to use same version of joblib to solve the problem

BarelySentient commented 5 years ago

That helps a ton, thank you @AlexZhou1995 !!

StuartFarmer commented 5 years ago

This is terrible. I'd add this just to get around joblib's typo:

try:
    from joblib.pool import MemmapingPool as MemmappingPool
except:
    from joblib.pool import MemmappingPool
GbengaOdesanmi commented 5 years ago

@all please can you help me on how to solve this problem? thanks in advance

python maml_examples/maml_trpo_point.py python3 /home/gbenga/Documents/2019vrepcode/maml_rl-master/maml_examples/scripts/run_experiment_lite.py --n_parallel '1' --snapshot_mode 'last' --seed '1' --plot 'False' --exp_name 'trpomaml1_fbs20_mbs40_flr_0.5metalr_0.01_step11' --log_dir '/home/gbenga/Documents/2019vrepcode/maml_rl-master/maml_examples/data/local/vpg-maml-point100/trpomaml1_fbs20_mbs40_flr_0.5metalr_0.01_step11' --use_cloudpickle 'False' --args_data 'gANjcmxsYWIubWlzYy5pbnN0cnVtZW50ClN0dWJNZXRob2RDYWxsCnEAKYFxAX1xAihYBgAAAF9fYXJnc3EDKGNybGxhYi5taXNjLmluc3RydW1lbnQKU3R1Yk9iamVjdApxBCmBcQV9cQYoWAQAAABhcmdzcQcpWAYAAABrd2FyZ3NxCH1xCShYAwAAAGVudnEKaAQpgXELfXEMKGgHKWgIfXENWAsAAAB3cmFwcGVkX2VudnEOaAQpgXEPfXEQKGgHKWgIfXERaApoBCmBcRJ9cRMoaAcpaAh9cRRYCwAAAHByb3h5X2NsYXNzcRVjcG9pbnRfZW52X3JhbmRnb2FsClBvaW50RW52UmFuZEdvYWwKcRZ1YnNoFWNybGxhYi5lbnZzLm5vcm1hbGl6ZWRfZW52Ck5vcm1hbGl6ZWRFbnYKcRd1YnNoFWNzYW5kYm94LnJvY2t5LnRmLmVudnMuYmFzZQpUZkVudgpxGHViWAYAAABwb2xpY3lxGWgEKYFxGn1xGyhoByloCH1xHChYBAAAAG5hbWVxHWgZWAgAAABlbnZfc3BlY3EeY3JsbGFiLm1pc2MuaW5zdHJ1bWVudApTdHViQXR0cgpxHymBcSB9cSEoWAQAAABfb2JqcSJoC1gKAAAAX2F0dHJfbmFtZXEjWAQAAABzcGVjcSR1YlgOAAAAZ3JhZF9zdGVwX3NpemVxJUc/4AAAAAAAAFgTAAAAaGlkZGVuX25vbmxpbmVhcml0eXEmY3RlbnNvcmZsb3cucHl0aG9uLm9wcy5nZW5fbm5fb3BzCnJlbHUKcSdYDAAAAGhpZGRlbl9zaXplc3EoS2RLZIZxKXVoFWNzYW5kYm94LnJvY2t5LnRmLnBvbGljaWVzLm1hbWxfbWluaW1hbF9nYXVzc19tbHBfcG9saWN5Ck1BTUxHYXVzc2lhbk1MUFBvbGljeQpxKnViWAgAAABiYXNlbGluZXEraAQpgXEsfXEtKGgHKWgIfXEuaB5oHymBcS99cTAoaCJoC2gjaCR1YnNoFWNybGxhYi5iYXNlbGluZXMubGluZWFyX2ZlYXR1cmVfYmFzZWxpbmUKTGluZWFyRmVhdHVyZUJhc2VsaW5lCnExdWJYCgAAAGJhdGNoX3NpemVxMksUWA8AAABtYXhfcGF0aF9sZW5ndGhxM0tkWA8AAABtZXRhX2JhdGNoX3NpemVxNEsoWBAAAABudW1fZ3JhZF91cGRhdGVzcTVLAVgFAAAAbl9pdHJxNktkWAgAAAB1c2VfbWFtbHE3iFgJAAAAc3RlcF9zaXplcThHP4R64UeuFHtYBAAAAHBsb3RxOYl1aBVjc2FuZGJveC5yb2NreS50Zi5hbGdvcy5tYW1sX3RycG8KTUFNTFRSUE8KcTp1YlgFAAAAdHJhaW5xOyl9cTx0cT1YCAAAAF9fa3dhcmdzcT59cT91Yi4=' python3: can't open file '/home/gbenga/Documents/2019vrepcode/maml_rl-master/maml_examples/scripts/run_experiment_lite.py': [Errno 2] No such file or directory

kvas7andy commented 5 years ago

@AlexZhou1995 thank you for workaround. Although no PR was proposed, so problem still exists.

j3soon commented 9 months ago

@kvas7andy, A PR seems to be proposed in #241.