facebookresearch/minihack

[BUG] Can't decode reward (manager)

Closed this issue ยท 2 comments

๐Ÿ› Bug

File "/blah.py", line 61, in step
ob, rew, done, info = self.env.step(action)
File "/home/me/miniconda3/envs/minihack/lib/python3.7/site-packages/minihack/base.py", line 357, in step
return super().step(action)
File "/home/me/miniconda3/envs/minihack/lib/python3.7/site-packages/nle/env/base.py", line 373, in step
end_status = self._is_episode_end(observation)
File "/home/me/miniconda3/envs/minihack/lib/python3.7/site-packages/minihack/base.py", line 364, in _is_episode_end
self, self._previous_obs, self._previous_action, observation
File "/home/me/miniconda3/envs/minihack/lib/python3.7/site-packages/minihack/reward_manager.py", line 732, in check_episode_end_call
env, previous_observation, action, observation
File "/home/me/miniconda3/envs/minihack/lib/python3.7/site-packages/minihack/reward_manager.py", line 241, in check
.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 0: invalid start byte

Environment

MiniHack version: 0.1.4
NLE version: 0.9.0
Gym version: 0.23.0
PyTorch version: 1.13.1
Is debug build: No
CUDA used to build PyTorch: 11.6

OS: Ubuntu 20.04.5 LTS
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
CMake version: version 3.16.3

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: Quadro K620
Nvidia driver version: 515.86.01
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.21.6
[pip3] torch==1.13.1
[pip3] torchaudio==0.13.1
[pip3] torchvision==0.13.1a0
[conda] blas 1.0 mkl
[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.13.1 py3.7_cuda11.6_cudnn8.3.2_0 pytorch
[conda] pytorch-cuda 11.6 h867d48c_1 pytorch
[conda] pytorch-mutex 1.0 cuda pytorch
[conda] torchaudio 0.13.1 py37_cu116 pytorch
[conda] torchvision 0.13.1 cpu_py37h164cc8f_0

Additional context

I'm getting segmentation faults from running the C nle Nethack.reset() function, and this is one bug I've had between those segmentation faults. Perhaps they are related.

Hi @JupiLogy. Could you please provide a little bit more detail? E.g. the blah.py script. Does it happen at every run (state/action pair) or only occasionally?

Hi! It was happening only occasionally, but after fixing some other bugs I didn't encounter it again... Now, it's working fine. What I (mainly) changed was reducing the set of actions available to the agent. Sorry I can't provide more info!