minigo icon indicating copy to clipboard operation
minigo copied to clipboard

Save Golden Chunks during Bigtable training

Open sethtroisi opened this issue 7 years ago • 2 comments

Saving the training examples that were sampled from BT would be really useful for #591

sethtroisi avatar Dec 17 '18 20:12 sethtroisi

can we persist the keyset we use? IIRC, we fetch all the keys, shuffle them in memory, and then turn them into the dataset. can we write out just the set of keys? Then, someone can repeat the training with the same examples right out of the bigtable.

amj avatar Jan 29 '19 20:01 amj

Definitely. Passing values_only=False to bigtable_input.get_unparsed_moves_from_last_n_games will return a dataset with (key, value) tensors. Applying .map(lambda k, v: k) to that dataset gives you the keys.

However, to use those keys again you need to pass the key dataset to tf.contrib.bigtable.BigtableTable.lookup_columns, which can be slow. It might be more expedient to simply store the final selected TFExamples in order in a TFRecord file, and reread from there.

gitosaurus avatar Jan 30 '19 22:01 gitosaurus