facebookresearch/minihack

[BUG] UnregisteredEnv error when evaluating on MiniHack-KeyRoom-Random

Closed this issue ยท 1 comments

๐Ÿ› Bug

I'm trying to test a trained agent, using the evaluate.py script. When I specify the MiniHack-KeyRoom-Random-S5-v0 or MiniHack-KeyRoom-Random-S15-v0 environment, I get an UnregisteredEnv error.
The agent was trained using the minihack.agent.polybeast.polyhydra script, with the IMPALA algorithm and MiniHack-KeyRoom-Random-S5-v0 as env.

To Reproduce

Steps to reproduce the behavior:

  1. run the command
    python -m minihack.agent.polybeast.evaluate --env MiniHack-KeyRoom-Random-S5-v0 -c . --no-watch --max-steps 40 -n 500

This is the error that I get:
Traceback (most recent call last):
File "/home/lquarantiello/miniconda3/envs/minihack/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/lquarantiello/miniconda3/envs/minihack/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/lquarantiello/minihack/minihack/agent/polybeast/evaluate.py", line 300, in
main()
File "/home/lquarantiello/minihack/minihack/agent/polybeast/evaluate.py", line 296, in main
eval(**vars(flags))
File "/home/lquarantiello/minihack/minihack/agent/polybeast/evaluate.py", line 80, in eval
observation_keys=obs_keys.split(","),
File "/home/lquarantiello/miniconda3/envs/minihack/lib/python3.7/site-packages/gym/envs/registration.py", line 235, in make
return registry.make(id, **kwargs)
File "/home/lquarantiello/miniconda3/envs/minihack/lib/python3.7/site-packages/gym/envs/registration.py", line 128, in make
spec = self.spec(path)
File "/home/lquarantiello/miniconda3/envs/minihack/lib/python3.7/site-packages/gym/envs/registration.py", line 203, in spec
raise error.UnregisteredEnv("No registered env with id: {}".format(id))
gym.error.UnregisteredEnv: No registered env with id: MiniHack-KeyRoom-Random-S5-v0

Expected behavior

Run the evaluate.py script and get the result of the test

Environment

MiniHack version: 0.1.3+6a04b16
NLE version: 0.8.1
Gym version: 0.21.0
PyTorch version: 1.11.0
Is debug build: No
CUDA used to build PyTorch: 10.2

OS: Ubuntu 20.04.4 LTS
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
CMake version: version 3.22.1

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: NVIDIA Tesla T4
Nvidia driver version: 465.19.01
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] libtorchbeast==0.0.20
[pip3] numpy==1.21.6
[pip3] torch==1.11.0
[pip3] torchaudio==0.11.0
[pip3] torchvision==0.12.0
[conda] blas 1.0 mkl
[conda] ffmpeg 4.3 hf484d3e_0 pytorch
[conda] libtorchbeast 0.0.20 pypi_0 pypi
[conda] magma-cuda113 2.5.2 1 pytorch
[conda] mkl 2021.4.0 h06a4308_640
[conda] mkl-service 2.4.0 py37h7f8727e_0
[conda] mkl_fft 1.3.1 py37hd3c417c_0
[conda] mkl_random 1.2.2 py37h51133e4_0
[conda] pytorch 1.11.0 py3.7_cuda10.2_cudnn7.6.5_0 pytorch
[conda] pytorch-mutex 1.0 cuda pytorch
[conda] torch 1.11.0 pypi_0 pypi
[conda] torchaudio 0.11.0 py37_cu102 pytorch
[conda] torchvision 0.12.0 py37_cu102 pytorch

Hi @luigiquara . Thanks for pointing this out.

We recently slightly updated some of the names of the environments in the MiniHack suite. The updated names of those environments are MiniHack-KeyRoom-S5-v0 and MiniHack-KeyRoom-S15-v0.

Check out the documentation for the up-to-date names of all envs: https://minihack.readthedocs.io/en/latest/envs/index.html

Please feel free to reopen if you have further questions.