def test(): appList = [] for line in open('filelist.txt'): appList.append(str(line.rsplit('\n')[0])) for app in appList: globalvars.appName = "app" + str(appList.index(app) + 69) globalvars.pinballLoc = str(app) globalvars.outputDirBase = "/home/gangwan2/workdir1/cs446/outputs/"+globalvars.appName+"/" baseConfig = tuple([96, 64, 256, 4, 512]) featureGeneration.extract([baseConfig], [featureNames], globalvars.outputDirBase, True)
def parallelDetailed(appName, pinballLoc, outputDirBase): # log the output of the process to a specific file sys.stdout = open(outputDirBase+"plog.out", "w") appfeatures = list(list()) #append the names of the features appfeatures.append(featureNames) goodConfigs = goodConfigDict[appName] # now that we have the good configs, we need to launch sniper runs again for # these configs with detailed stat (counter-data) collection enabled #print('++Detailed-Run++') launcher.run(goodConfigs, parameterNames, True, False, pinballLoc, outputDirBase) # from the detailed runs, we now extract the feature vectors - this forms the # training data. Feature vectors are logged to a file #print('++Extraction++') featureGeneration.extract(goodConfigs, appfeatures, outputDirBase)