Create checkpoint dir before writing flags file in it
This commit is contained in:
parent
ba2d29b36f
commit
371e73eb69
@ -472,6 +472,8 @@ def train():
|
|||||||
best_dev_filename = 'best_dev_checkpoint'
|
best_dev_filename = 'best_dev_checkpoint'
|
||||||
|
|
||||||
# Save flags next to checkpoints
|
# Save flags next to checkpoints
|
||||||
|
os.makedirs(FLAGS.checkpoint_dir, exist_ok=True)
|
||||||
|
|
||||||
flags_file = os.path.join(FLAGS.checkpoint_dir, 'flags.txt')
|
flags_file = os.path.join(FLAGS.checkpoint_dir, 'flags.txt')
|
||||||
with open(flags_file, 'w') as fout:
|
with open(flags_file, 'w') as fout:
|
||||||
fout.write(FLAGS.flags_into_string())
|
fout.write(FLAGS.flags_into_string())
|
||||||
|
Loading…
Reference in New Issue
Block a user