Skip to content

DEPRL cannont train new env #306

@LoFull

Description

@LoFull

Dear team,
Hello, I now want to train my newly created Environment with deprl. I have successfully run the rendered image through "Test Environment" when I use:python -m deprl.main baselines_DEPRL/myoLegWalk_zhao.jsonan error occurred.The error message was:

Traceback (most recent call last):
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/gym/envs/registration.py", line 132, in spec
    return self.env_specs[id]
KeyError: 'myoLegWalkZhao-v0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rb/anaconda3/envs/my/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/rb/anaconda3/envs/my/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/deprl/main.py", line 136, in <module>
    main()
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/deprl/main.py", line 132, in main
    train(config)
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/deprl/main.py", line 42, in train
    environment = custom_distributed.distribute(
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/deprl/custom_distributed.py", line 267, in distribute
    dummy_environment = build_env_from_dict(build_dict)
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/deprl/custom_distributed.py", line 294, in build_env_from_dict
    return env_tonic_compat(**build_dict)
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/deprl/env_wrappers/__init__.py", line 19, in env_tonic_compat
    return apply_wrapper(eval(env))
  File "<string>", line 1, in <module>
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/deprl/vendor/tonic/environments/builders.py", line 19, in gym_environment
    return build_environment(_builder, *args, **kwargs)
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/deprl/vendor/tonic/environments/builders.py", line 67, in build_environment
    environment = builder(name, *args, **kwargs)
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/deprl/vendor/tonic/environments/builders.py", line 17, in _builder
    return gym.make(*args, **kwargs)
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/gym/envs/registration.py", line 156, in make
    return registry.make(id, **kwargs)
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/gym/envs/registration.py", line 100, in make
    spec = self.spec(path)
  File "/home/rb/anaconda3/envs/my/lib/python3.8/site-packages/gym/envs/registration.py", line 142, in spec
    raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: myoLegWalkZhao-v0

Only my config file has been modified:
"environment": "deprl.environments.Gym('myoLegWalkZhao-v0', reset_type='random', scaled_actions=False)",

I'm sure the name of the gym environment has not been entered incorrectly. May I ask what the reason is?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions