Exemplo n.º 1
0
#IMPORTANT: Only the FIRST config is used by core.runBatch to set filenames, paths, engine, number of subsets and runs
#IMPORTANT: All configs are selected at random to run their own specified generate function for data generation
configs = [
    fractionConfig1('ft1_racecar', 'f1header.xml', 'private/test5/', 'set')
]
configs[0].subsets_per_set = 1
configs[0].datasets_per_run = 40
configs[0].outputCSV = 0

#Load config(s)
if (LOAD_PREVIOUS_CONFIG):
    temp = configs[0].loadConfig(configs[0].directory + "generator_config")
    if (temp != None):
        configs[0] = temp

configs[0].num_max = [6, 10, 14, 18, 28, 36, 36]

#Generate questions
if (GENERATE):
    core.runBatch(configs)
elif (BATCHRUN):
    batch = [['private/test4/generator_config'],
             ['private/test5/generator_config'],
             ['private/test6/generator_config'],
             ['private/test7/generator_config']]

    core.runMultiBatch(fractionConfig1, batch)

#Save config(s)
if (SAVE_CURRENT_CONFIG):
    configs[0].saveConfig(configs[0].directory + "generator_config")
def loadBatch(loadWith, batchLoad):
    for configLocs in batchLoad:
        c = []
        for path in configLocs:
            c.append(loadWith.loadConfig(path))
        core.runBatch(c)
    
###############################################################################

#generate/build/load needed configs here
#IMPORTANT: Only the FIRST config is used by core.runBatch to set filenames, paths, engine, number of subsets and runs
#IMPORTANT: All configs are selected at random to run their own specified generate function for data generation
configs = [fractionConfig1('ft1_racecar', 'f1header.xml', 'private/test5/', 'set')]
configs[0].subsets_per_set = 1
configs[0].datasets_per_run = 40
configs[0].outputCSV = 0

#Load config(s)
if(LOAD_PREVIOUS_CONFIG):
    temp = configs[0].loadConfig(configs[0].directory + "generator_config")
    if(temp != None):
        configs[0] = temp

configs[0].num_max = [6, 10, 14, 18, 28, 36, 36]
        
#Generate questions
if(GENERATE):
    core.runBatch(configs)
elif(BATCHRUN):
    batch = [['private/test4/generator_config'], ['private/test5/generator_config'],
             ['private/test6/generator_config'], ['private/test7/generator_config']]
             
    core.runMultiBatch(fractionConfig1, batch)

#Save config(s)
if(SAVE_CURRENT_CONFIG):
    configs[0].saveConfig(configs[0].directory + "generator_config")
def loadBatch(loadWith, batchLoad):
    for configLocs in batchLoad:
        c = []
        for path in configLocs:
            c.append(loadWith.loadConfig(path))
        core.runBatch(c)