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

Question about installation. #32

Closed
JinGyunJeong opened this issue Mar 2, 2022 · 4 comments
Closed

Question about installation. #32

JinGyunJeong opened this issue Mar 2, 2022 · 4 comments

Comments

@JinGyunJeong
Copy link

JinGyunJeong commented Mar 2, 2022

Hello,
I'm having trouble with installing - (4) Benchmarking.
When i run the command,

python -m run --algo bc --run_prefix bc_table_lack_0825 --env IKEASawyerDense-v0 --furniture_name table_lack_0825 --demo_path demos/Sawyer_table_lack_0825

No module named 'run' error occured.
So i changed to

python -m furniture.run --algo bc --run_prefix bc_table_lack_0825 --env IKEASawyerDense-v0 --furniture_name table_lack_0825 --demo_path demos/Sawyer_table_lack_0825

The error about directory is cleared.
In the run code,

from method.main import run
from env import *
from config import create_parser
from method.config import add_method_arguments

Then, another errors occured.
In the furniture folder, there is no folder named 'method'.
But in the script 'run.py', the code imports 'method' module.

ModuleNotFoundError: No module named 'method'

So i don't no how to run the command.

@feup-jmc
Copy link

Bumping, have the same issue

@edwhu
Copy link
Member

edwhu commented Mar 23, 2022

Hi, thanks for bringing up the issue. Seems like master branch is not correctly updated. Basically, we moved all the RL code into a separate github repo (https://github.com/youngwoon/robot-learning), and that should be the method folder.

The run.py file seems to be missing in the master branch. Also the method folder. We will take a look at this. @youngwoon

If you just want to get the code running, you can checkout to an earlier commit on master where they still exist. This is one I found. https://github.com/clvrai/furniture/commit/1bf003c6a44dbaea304174ac17d70c4cf3209e9b

@feup-jmc
Copy link

Thank you very much for the reply!

I have tried using the mentioned commit and the program runs much further. However, I still get a difficult to debug error.
Running python -m run --algo gail --run_prefix gail_table_lack_0825 --env IKEASawyer-v0 --furniture_name table_lack_0825 --demo_path demos/Sawyer_table_lack_0825 yields:

pybullet build time: Mar 12 2022 19:43:28
[2022-03-30 21:15:02,536] Run a base worker.
[2022-03-30 21:15:02,536] Create log directory: log/IKEASawyer-v0.gail.gail_table_lack_0825.123
[2022-03-30 21:15:02,536] Create video directory: log/IKEASawyer-v0.gail.gail_table_lack_0825.123/video
[2022-03-30 21:15:02,536] Create demo directory: log/IKEASawyer-v0.gail.gail_table_lack_0825.123/demo
[2022-03-30 21:15:02,615] Store parameters in log/IKEASawyer-v0.gail.gail_table_lack_0825.123/params.json
[2022-03-30 21:15:02,616] Unknown environment name: IKEASawyer-v0
Available environments: 
[2022-03-30 21:15:02,617] Instead, query gym environments
[2022-03-30 21:15:02,617] Failed to launch an environment with config.
[2022-03-30 21:15:02,617] Environment 'IKEASawyer' doesn't exist.
[2022-03-30 21:15:02,617] Launch an environment without config.
Traceback (most recent call last):
  File "~/TESTDIR/furniture_repo_test/furniture/method/environments/__init__.py", line 71, in get_gym_env
    env = gym.make(env_id, **env_kwargs)
  File "~/anaconda3/envs/IKEA_1/lib/python3.7/site-packages/gym/envs/registration.py", line 676, in make
    return registry.make(id, **kwargs)
  File "~/anaconda3/envs/IKEA_1/lib/python3.7/site-packages/gym/envs/registration.py", line 490, in make
    versions = self.env_specs.versions(namespace, name)
  File "~/anaconda3/envs/IKEA_1/lib/python3.7/site-packages/gym/envs/registration.py", line 220, in versions
    self._assert_name_exists(namespace, name)
  File "~/anaconda3/envs/IKEA_1/lib/python3.7/site-packages/gym/envs/registration.py", line 297, in _assert_name_exists
    raise error.NameNotFound(message)
gym.error.NameNotFound: Environment 'IKEASawyer' doesn't exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~/anaconda3/envs/IKEA_1/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "~/anaconda3/envs/IKEA_1/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "~/TESTDIR/furniture_repo_test/furniture/run.py", line 18, in <module>
    run(parser)
  File "~/TESTDIR/furniture_repo_test/furniture/method/main.py", line 75, in run
    trainer = Trainer(config)
  File "~/TESTDIR/furniture_repo_test/furniture/method/trainer.py", line 46, in __init__
    self._env = make_env(config.env, config)
  File "~/TESTDIR/furniture_repo_test/furniture/method/environments/__init__.py", line 48, in make_env
    return get_gym_env(name, config)
  File "~/TESTDIR/furniture_repo_test/furniture/method/environments/__init__.py", line 76, in get_gym_env
    env = gym.make(env_id)
  File "~/anaconda3/envs/IKEA_1/lib/python3.7/site-packages/gym/envs/registration.py", line 676, in make
    return registry.make(id, **kwargs)
  File "~/anaconda3/envs/IKEA_1/lib/python3.7/site-packages/gym/envs/registration.py", line 490, in make
    versions = self.env_specs.versions(namespace, name)
  File "~/anaconda3/envs/IKEA_1/lib/python3.7/site-packages/gym/envs/registration.py", line 220, in versions
    self._assert_name_exists(namespace, name)
  File "~/anaconda3/envs/IKEA_1/lib/python3.7/site-packages/gym/envs/registration.py", line 297, in _assert_name_exists
    raise error.NameNotFound(message)
gym.error.NameNotFound: Environment 'IKEASawyer' doesn't exist.

Any hints on how to solve it? It seems Gym doesn't recognise the environment despite handling it fine in demo_manual.py

@youngwoon
Copy link
Member

Sorry for the missing RL/IL code. We have been working on improving both the environment and RL/IL algorithms, but it's been delayed due to many changes recently made by MuJoCo 2.1.

To quickly use try basic algorithms, such as PPO, SAC, and BC, please refer to https://github.com/clvrai/skill-chaining#usage

I can probably update this repo by June 2022.

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

4 participants