Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dpaleka
Copy link

@dpaleka dpaleka commented Sep 25, 2023

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.

generate_data.py Outdated
if __name__ == "__main__":
# Use typer instead
import typer
app = typer.Typer()
Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is chardet used?

Copy link
Author

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}
Copy link
Owner

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)

Copy link
Owner

@pHaeusler pHaeusler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Couple comments

@dpaleka dpaleka marked this pull request as ready for review September 30, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants