facebookresearch / nle

The NetHack Learning Environment
Other
940 stars 113 forks source link

How to generate csv files? #212

Closed cjdjr closed 2 years ago

cjdjr commented 3 years ago

I tried to analyze the behavior of the agent through the dashboard. But a csv file is required to run the dashboard, how to generate csv files ?

mwbyeon commented 3 years ago

@cjdjr That's disabled in the code :(

https://github.com/facebookresearch/nle/blob/b85184f65426e8a7a63b3fdbb1dead135e01e6cc/nle/env/base.py#L282-L284

https://github.com/facebookresearch/nle/blob/b85184f65426e8a7a63b3fdbb1dead135e01e6cc/nle/env/base.py#L466-L476

heiner commented 3 years ago

Yes, this logic is currently disabled.

It shouldn't be too hard to produce a csv file on the agent side. The required headers are

            "end_status",
            "score",
            "time",
            "steps",
            "hp",
            "exp",
            "exp_lev",
            "gold",
            "hunger",
            "killer_name",
            "deepest_lev",
            "episode",
            "seeds",
            "ttyrec",

(The JavaScript code probably doesn't like the bz2'd ttyrecs, so you might have to un-bzip2 them (either before running the dashboard or by changing the dashboard JS.)

mwbyeon commented 3 years ago

@heiner Thank you. Do you have any plan to develop code that generates a csv file? I'm looking forward to it :)

heiner commented 2 years ago

Hey @mwbyeon, @cjdjr,

This might not be the resolution you've been looking for but we've just decided to remove the JavaScript dashboard as we haven't been maintaining it very well.

If you feel strongly about wanting to keep using the dashboard I'm happy to add more pointers at how you could do that, let me know.