This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Nov 15, 2020
Merged
8f3f220
to
967bc42
Compare
That's great and really useful. Thanks @condnsdmatters ! |
Black still not happy? (I can really recommend auto-running black on saving in your editor!) Otherwise LGTM. This script is old and was used before we had libnethack. In a sense process overhead was an even worse problem at the time but perhaps we cared less :) |
@condnsdmatters In the nle repo's root, run |
edran
approved these changes
Nov 16, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on using pytest-benchmark
. The added test looks good.
3278504
to
045f7ce
Compare
045f7ce
to
d6630d7
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL:DR;
This PR involves 2 fixes.
check_nethack_speed
to ensure it runs. Sadly as its not hooked into any automated tests I think it just got a bit out of sync with the API.Example Output
Why use the benchmark instead of the former script**?
Well it seemed to me that the former script didn't really measure the steps per second of a single environment, rather the maximum throughput one could get running all the environments in suprocesses and putting the number of steps in a shared queue (which could be still useful!).
To illustrate my point consider the following screenshot, in which you choose 1, 2, 5, and (default) 10 environments to use. Clearly there's an communication overhead that becomes the dominant factor at 50k steps per second, which is misleading given each of the 10 environments can reach about 10k steps a second.
As a result I propose using the pytest-benchmark to run performance tests, and perhaps rename
check_nethack_speed
to something more descriptive? I'm open to suggestions.