-
Notifications
You must be signed in to change notification settings - Fork 2
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
Winning without optimization / SFT, by modeling (outcome, moves) pairs #1
base: main
Are you sure you want to change the base?
Conversation
generate_data.py
Outdated
if __name__ == "__main__": | ||
# Use typer instead | ||
import typer | ||
app = typer.Typer() |
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.
is app needed here?
also, let's import at the top of the file
requirements.txt
Outdated
torch | ||
typer | ||
wandb | ||
chardet |
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.
is chardet used?
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.
This was likely just an issue with my conda env; removing that
generate_data.py
Outdated
@@ -53,29 +53,52 @@ def seq_to_board(seq): | |||
return board | |||
|
|||
|
|||
def save_data(trajectories): | |||
w_map = {-1: 0, 1: 1, None: 2} |
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.
Should probably use new tokens for these. (declare in tokens.py)
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.
Nice! Couple comments
Add the
incl_winner
flag which adds the outcome (player 1 win, player 2 win, draw) in front of the list of moves. Training on the outcome enables conditioning on it at inference time; conditioning on (player 1 win) increases the win rate from under 50% to around 63%. This is somewhat inspired by Decision Transformers.