Skip to content

Process crashes when using two NLE instances sequentially (on MacOS for Debug Builds) #31

@StephenOman

Description

@StephenOman

This is the migrated copy of the original issue here: facebookresearch#254

🐛 Bug

The test in facebookresearch#253 should pass but fails on MacOS for Debug builds.

To Reproduce

import random

import gym
import nle


ACTIONS = [0, 1, 2]


def main():
    envs = [gym.make("NetHackScore-v0") for _ in range(2)]

    env, *queue = envs
    env.reset()

    num_resets = 1

    while num_resets < 10:
        _, _, done, _ = env.step(random.choice(ACTIONS))
        if done:
            print("one env done")
            queue.append(env)
            env = queue.pop(0)
            print("about to reset one env")
            env.reset()
            num_resets += 1


main()

Environment

Collecting environment information...
NLE version: 0.7.3+08b9280
PyTorch version: 1.9.0
Is debug build: No
CUDA used to build PyTorch: None

OS: Mac OSX 11.5.1
GCC version: Could not collect
CMake version: version 3.20.0

Python version: 3.8
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip3] numpy==1.19.2
[pip3] numpysane==0.34
[pip3] torch==1.9.0
[conda] blas 1.0 mkl
[conda] mkl 2019.4 233
[conda] mkl-service 2.3.0 py38h9ed2024_0
[conda] mkl_fft 1.3.0 py38ha059aab_0
[conda] mkl_random 1.1.1 py38h959d312_0
[conda] pytorch 1.9.0 py3.8_0 pytorch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions