22 lines
650 B
Python
22 lines
650 B
Python
|
import glob, datetime, os
|
||
|
from VowpalWrapper.wrapper import wrap_ex
|
||
|
|
||
|
def generate_dataset(run_count, clear):
|
||
|
print("Collecting data...")
|
||
|
wrap_ex("./VowpalWabbit/vowpal_auto_run.sh "+str(run_count))
|
||
|
|
||
|
|
||
|
"""
|
||
|
filename = "./VowpalWabbit/VowPalInputData/input_dataset" + str(datetime.datetime.now().strftime("%m%d%H%M"))
|
||
|
input_file = open(filename,"w+")
|
||
|
for pfile in glob.glob('./VowpalWabbit/VowPalInputData/*.txt'):
|
||
|
print(pfile)
|
||
|
partial_input = open(pfile, "r+")
|
||
|
for line in partial_input:
|
||
|
input_file.write(line)
|
||
|
partial_input.close()
|
||
|
input_file.close()
|
||
|
os.rename(filename, filename + ".txt")
|
||
|
"""
|
||
|
|
||
|
generate_dataset(2, True)
|