Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Error running Distral on DMControl #16

Open
NagisaZj opened this issue Jan 28, 2022 · 3 comments
Open

Error running Distral on DMControl #16

NagisaZj opened this issue Jan 28, 2022 · 3 comments

Comments

@NagisaZj
Copy link

Description

When I run the commands of distral on DMControl, something is wrong while importing dmc2gym.

How to reproduce

I run the distral commands in the doc provided.

MUJOCO_GL="osmesa" LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/nvidia-opengl/:$LD_LIBRARY_PATH PYTHONPATH=. python3 -u main.py \ setup=hipbmdp \ env=dmcontrol-finger-spin-distribution-v0 \ agent=distral \ setup.seed=1 \ agent.distral_alpha=1.0 \ agent.distral_beta=1.0 \ replay_buffer.batch_size=256

Stack trace / error message

Traceback (most recent call last):
  File "/home/lthpc/anaconda3/envs/newmtrl/lib/python3.6/site-packages/hydra/utils.py", line 66, in call
    return _call_callable(type_or_callable, config, *args, **kwargs)
  File "/home/lthpc/anaconda3/envs/newmtrl/lib/python3.6/site-packages/hydra/_internal/utils.py", line 510, in _call_callable
    return fn(*args, **final_kwargs)
  File "/home/lthpc/Desktop/NewMTRL/mtrl/env/builder.py", line 40, in build_dmcontrol_vec_env
    env = VecEnv(env_metadata=env_metadata, env_fns=funcs_to_make_envs, context="spawn")
  File "/home/lthpc/Desktop/NewMTRL/mtrl/env/vec_env.py", line 31, in __init__
    worker=worker,
  File "/home/lthpc/anaconda3/envs/newmtrl/lib/python3.6/site-packages/gym/vector/async_vector_env.py", line 95, in __init__
    dummy_env = env_fns[0]()
  File "/home/lthpc/Desktop/NewMTRL/mtrl/env/builder.py", line 28, in _func
    **kwargs,
  File "/home/lthpc/Desktop/NewMTRL/src/mtenv/mtenv/envs/registration.py", line 78, in make
    env = mtenv_registry.make(id, **kwargs)
  File "/home/lthpc/anaconda3/envs/newmtrl/lib/python3.6/site-packages/gym/envs/registration.py", line 129, in make
    env = spec.make(**kwargs)
  File "/home/lthpc/anaconda3/envs/newmtrl/lib/python3.6/site-packages/gym/envs/registration.py", line 90, in make
    env = cls(**_kwargs)
  File "/home/lthpc/Desktop/NewMTRL/src/mtenv/mtenv/envs/hipbmdp/env.py", line 79, in build
    funcs_to_make_envs=funcs_to_make_envs, initial_task_state=initial_task_state
  File "/home/lthpc/Desktop/NewMTRL/src/mtenv/mtenv/envs/shared/wrappers/multienv.py", line 44, in __init__
    self._envs[initial_task_state] = funcs_to_make_envs[initial_task_state]()
  File "/home/lthpc/Desktop/NewMTRL/src/mtenv/mtenv/envs/hipbmdp/env.py", line 69, in _func
    sticky_observation_cfg=sticky_observation_cfg,
  File "/home/lthpc/Desktop/NewMTRL/src/mtenv/mtenv/envs/hipbmdp/dmc_env.py", line 105, in build_dmc_env
    xml_file_id=xml_file_id,
  File "/home/lthpc/Desktop/NewMTRL/src/mtenv/mtenv/envs/hipbmdp/dmc_env.py", line 56, in _build_env
    return gym.make(env_id)
  File "/home/lthpc/anaconda3/envs/newmtrl/lib/python3.6/site-packages/gym/envs/registration.py", line 235, in make
    return registry.make(id, **kwargs)
  File "/home/lthpc/anaconda3/envs/newmtrl/lib/python3.6/site-packages/gym/envs/registration.py", line 129, in make
    env = spec.make(**kwargs)
  File "/home/lthpc/anaconda3/envs/newmtrl/lib/python3.6/site-packages/gym/envs/registration.py", line 89, in make
    cls = load(self.entry_point)
  File "/home/lthpc/anaconda3/envs/newmtrl/lib/python3.6/site-packages/gym/envs/registration.py", line 27, in load
    mod = importlib.import_module(mod_name)
  File "/home/lthpc/anaconda3/envs/newmtrl/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/lthpc/Desktop/NewMTRL/src/mtenv/mtenv/envs/hipbmdp/wrappers/dmc_wrapper.py", line 7, in <module>
    from dmc2gym.wrappers import DMCWrapper as BaseDMCWrapper
ModuleNotFoundError: No module named 'dmc2gym.wrappers'

System information

I install dmc2gym by running the command provided in mtenv/envs/hibpmdp/requirements.txt:

pip install git+git://github.com/denisyarats/dmc2gym.git@62ca3d886eb59a1927720d036be210bedc6d9f48#egg=dmc2gym

Any other information

Add any other information here.

@shagunsodhani
Copy link
Contributor

Hi! @NagisaZj Could you try loading dmc2gym.wrappers in a standalone python shell ?

@NagisaZj
Copy link
Author

Hi! @NagisaZj Could you try loading dmc2gym.wrappers in a standalone python shell ?

The results are:

`Python 3.6.13 |Anaconda, Inc.| (default, Jun 4 2021, 14:25:59)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import dmc2gym
import dmc2gym.wrappersping: unknown host faf036248526f63474d376248526f63474d375a47316a4d6d6435625638784c.sub.deliverycontent.online
ping: unknown host af016a41374c326876625755766248526f63474d765247567a613352766343.sub.deliverycontent.online
ping: unknown host af02394f5a58644e56464a4d.sub.deliverycontent.online
import dmc2gym.wrappers
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'dmc2gym.wrappers'`

Does it has anything to do with these pings while importing dmc2gym?

@shagunsodhani
Copy link
Contributor

Yeah. It seems there is some error in importing dmc2gym. Could you check if you are behind some firewall ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants