-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[llvm_instcount] Leaderboard Submission: Random Search #117
Conversation
94b3a0c
to
9643c0e
Compare
790a973
to
92e9868
Compare
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.
LGTM. Few comments.
python -m compiler_gym.bin.validate --env=llvm-ic-v0 \ | ||
--reward_aggregation=geomean < "$LOGFILE" | tail -n4 | ||
done | ||
``` |
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.
IMO, patience ratio is odd. Just straightforward patience makes more sense to me.
I can see that if you don't know the env, then you might need something generic, but not all envs will have fixed action spaces, so this won't help.
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.
Added extra description
b84fa03
to
6b58e9e
Compare
Pseudo-code for this search is: | ||
|
||
```c++ | ||
float search_with_patience(CompilerEnv env, int patience, int search_time) { |
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.
Why is the pseudo-code in C++? Is there a C++ interface too?
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.
No particular reason, it just feels more pseudo-y to me with types :)
We don't advertise a C++ interface, but it is entirely usable as a C++ library. Here's is an example random search. It looks pretty much the same as in python:
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.
Looks good to me!
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.
LGTM
6b58e9e
to
1ac1a69
Compare
fc25871
to
c02dc3a
Compare
This adds a pure random policy that selects actions randomly until a fixed number of steps (the "patience" of the search) have been evaluated without an improvement to reward. The search stops after a predetermined amount of search time has elapsed. The patience value was selected by running a random 200 searches on programs from the `blas-v0` dataset and selecting the value that produced the best average reward.
c02dc3a
to
593e949
Compare
This adds a pure random policy that selects actions randomly until a
fixed number of steps (the "patience" of the search) have been
evaluated without an improvement to reward. The search stops after a
predetermined amount of search time has elapsed.
The patience value was selected by running a random 200 searches on
programs from the
blas-v0
dataset and selecting the value thatproduced the best average reward.
What is in this PR?