facebookresearch / nle

The NetHack Learning Environment
Other
942 stars 113 forks source link

Add an `exists` method #328

Closed cdmatters closed 2 years ago

cdmatters commented 2 years ago

Maybe this is overkill, but i think it enables a good idiom:

import nle.dataset as nld

if not nld.db.exists():
    nld.db.create()
    nld.add_nledata_directory(path_to_dir, name)