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

ImportError: cannot import name 'ArmActionMode' #43

Closed
Sid-B-K opened this issue Jul 2, 2022 · 1 comment
Closed

ImportError: cannot import name 'ArmActionMode' #43

Sid-B-K opened this issue Jul 2, 2022 · 1 comment

Comments

@Sid-B-K
Copy link

Sid-B-K commented Jul 2, 2022

Screenshot from 2022-07-02 18-49-39

I am getting this issue (in the screenshot) while running RLzoo with RLbench using the following code:

from rlzoo.common.env_wrappers import *
from rlzoo.common.utils import *
from rlzoo.algorithms import *

EnvName = 'ReachTarget'
EnvType = 'rlbench'
env = build_env(EnvName, EnvType, state_type='vision')

AlgName = 'SAC'
alg_params, learn_params = call_default_params(env, EnvType, AlgName)
alg = eval(AlgName+'(**alg_params)')
alg.learn(env=env, mode='train', render=False, **learn_params)
alg.learn(env=env, mode='test', render=True, **learn_params)

env.close()

I have also added export PYTHONPATH="/home/sidharth/RLBench" in .bashrc

Any help would be appreciated! Thanks.

@Sid-B-K
Copy link
Author

Sid-B-K commented Jul 4, 2022

This issue is now fixed!

The problem was in RLzoo/rlzoo/common/build_rlbench_env.py, there is now a new action mode API in RLBench that allows for easier custom action modes.

The code in this file should be modified, the commented code should be replaced by the code below (as shown in the screenshots).

Screenshot from 2022-07-04 15-39-07

Screenshot from 2022-07-04 15-39-24

Screenshot from 2022-07-04 15-39-54

After editing, go to the RLzoo folder, using cd RLzoo and type pip3 install . to rebuild it.

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