Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

update selfplay to write 5% of games to a holdout directory #57

Merged
merged 2 commits into from
Feb 5, 2018

Conversation

amj
Copy link
Contributor

@amj amj commented Feb 5, 2018

  • Changes the signature on preprocessing.make_dataset_from_selfplay to return the tf_examples instead of write a file
  • sets a default holdout directory and makes the appropriate changes in rl_loop.py
  • currently not an argument, nor is the amount of holdout a parameter. Should it be?

@amj amj requested a review from brilee February 5, 2018 19:52
preprocessing.py Outdated
'''
Returns a set of tf.Examples.
Copy link
Contributor

Choose a reason for hiding this comment

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

return an iterable of tf.Example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

rl_loop.py Outdated
@@ -28,6 +28,7 @@
BASE_DIR = "gs://{}".format(BUCKET_NAME)
MODELS_DIR = os.path.join(BASE_DIR, 'models')
SELFPLAY_DIR = os.path.join(BASE_DIR, 'games')
Copy link
Contributor

Choose a reason for hiding this comment

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

While we're rejiggering our folder naming scheme, can we rename the selfplay dir? "games" is pretty nondescriptive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

preprocessing.make_dataset_from_selfplay(game_data, fname)
tf_examples = preprocessing.make_dataset_from_selfplay(game_data)

# Hold out 5% of games for evaluation.
Copy link
Contributor

Choose a reason for hiding this comment

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

make 0.05 a flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gilding the lily a bit but done :)

@amj amj merged commit f941f5a into tensorflow:master Feb 5, 2018
@amj amj deleted the eval-holdout branch February 5, 2018 20:20
@@ -118,10 +118,12 @@ def evaluate(
def selfplay(
load_file: "The path to the network model files",
output_dir: "Where to write the games"="data/selfplay",
holdout_dir: "Where to write the games"="data/holdout",
Copy link
Contributor

Choose a reason for hiding this comment

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

is this written to local disk?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's written to wherever you pass it. This can be a gs:// path

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants