Skip to content

Commit

Permalink
Skip data download if the files are already present
Browse files Browse the repository at this point in the history
  • Loading branch information
shoshijak committed Jul 1, 2018
1 parent 54ab74f commit d4a5a57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion train_inst2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ def main(argv):
data_folder = os.path.join(FLAGS.data_folder, FLAGS.data)
if not os.path.exists(FLAGS.embeddings_file):

if FLAGS.data == "data":
if FLAGS.data == "data" and len(os.listdir(data_folder)) <= 1:
# Generate the data set
print('Folder', data_folder, 'is empty - preparing to download training data')
i2v_datagen.datagen(data_folder)
else:
# Assert the data folder's existence
Expand Down

0 comments on commit d4a5a57

Please sign in to comment.