Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

nle-ttyplay crash #353

Open
hlinander opened this issue Mar 20, 2023 · 0 comments
Open

nle-ttyplay crash #353

hlinander opened this issue Mar 20, 2023 · 0 comments

Comments

@hlinander
Copy link

hlinander commented Mar 20, 2023

🐛 Bug

Crash when running nle-ttyplay (or nle-ttyplay2) on the ttyrec3 file generated by the test function in agent.

NetHack, Copyright 1985-2020
         By Stichting Mathematisch Centrum and M. Stephenson.
         Version 3.6.6-0 Unix post-release, built Mar 20 20:58:46 2023.
         See license for details.
Hello Agent, welcome to NetHack!  You are a neutral male human Monk.

                                                         -------------
                                                         ............|
                                                         |...........|
                                                         ......d.....|
                                                         |......Traceback (most recent call last):
  File "/opt/conda/bin/nle-ttyplay2", line 8, in <module>-----+----- -
    sys.exit(main())
  File "/opt/conda/lib/python3.8/site-packages/nle/scripts/ttyplay2.py", line 10, in main
    ttyplay.main()
  File "/opt/conda/lib/python3.8/site-packages/nle/scripts/ttyplay.py", line 212, in main
    process(f)
  File "/opt/conda/lib/python3.8/site-packages/nle/scripts/ttyplay.py", line 128, in process
    for timestamp, length, channel in read_header(
  File "/opt/conda/lib/python3.8/site-packages/nle/scripts/ttyplay.py", line 107, in read_header
    raise IOError("Illegal header %s" % ((sec, usec, length, channel),))
OSError: Illegal header (1679347987, 464255, 4, 2)

To Reproduce

Steps to reproduce the behavior:

  1. Run the example agent training (python -m nle.agent.agent --num_actors 5 --batch_size 32 --unroll_length 80 --learning_rate 0.0001 --entropy_cost 0.0001 --use_lstm --total_steps 1000000000)
  2. Run test mode
    python -m nle.agent.agent --mode test --use_lstm --save_ttyrec_every 1
  3. Run ttyplay on generated ttyrec3 file, in my case this is something like
    nle-ttyplay nle_data/20230320-213238_4evrptzm/nle.256.1.ttyrec3.bz2

Expected behavior

Expected to see a ttyplay replay.

Environment

NLE version: 0.9.0+4f5b57e
PyTorch version: 2.0.0+cu117
Is debug build: No
CUDA used to build PyTorch: 11.7

OS: Ubuntu 18.04.6 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.26.0

Python version: 3.8
Is CUDA available: Yes
CUDA runtime version: 10.2.89
GPU models and configuration: GPU 0: NVIDIA GeForce GTX 1070
Nvidia driver version: 520.56.06
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5

Versions of relevant libraries:
[pip3] numpy==1.24.2
[pip3] torch==2.0.0
[conda] torch 2.0.0 pypi_0 pypi

Additional context

Running in a docker image built from the provided Dockerfile.bionic.

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

1 participant