Skip to content
Snippets Groups Projects
Commit a6324449 authored by Franck Dary's avatar Franck Dary
Browse files

Added eval to launchBatches and changed models names

parent 88bc59ba
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,18 @@ def launchTrainBash(mode, expName, arguments) : ...@@ -30,6 +30,18 @@ def launchTrainBash(mode, expName, arguments) :
shell=True, stdout=open("%s.stdout"%expName,'w'), stderr=open("%s.stderr"%expName,'w')) shell=True, stdout=open("%s.stdout"%expName,'w'), stderr=open("%s.stderr"%expName,'w'))
############################################################################### ###############################################################################
###############################################################################
def launchEval(mode, expName, launcher) :
if launcher == "bash" :
launchEvalBash(mode, expName)
###############################################################################
###############################################################################
def launchEvalBash(mode, expName) :
subprocess.Popen("./evaluate.sh %s bin/%s --silent"%(mode,expName),
shell=True, stdout=open("%s.stdout"%expName,'a'), stderr=open("%s.stderr"%expName,'a'))
###############################################################################
############################################################################### ###############################################################################
if __name__ == "__main__" : if __name__ == "__main__" :
if len(sys.argv) != 4 : if len(sys.argv) != 4 :
...@@ -48,12 +60,12 @@ if __name__ == "__main__" : ...@@ -48,12 +60,12 @@ if __name__ == "__main__" :
for xp in desc.templatesExperiments : for xp in desc.templatesExperiments :
for i in range(desc.nbReplicas) : for i in range(desc.nbReplicas) :
xp['lang'] = lang xp['lang'] = lang
xp['expName'] = xp['expName'].split('.')[0]+"."+str(i) xp['expName'] = xp['expName'].split('.')[0]+"."+lang+"."+str(i)
if mode == "train" : if mode == "train" :
prepareExperiment(xp['lang'],xp['template'],xp['expName']) prepareExperiment(xp['lang'],xp['template'],xp['expName'])
launchTrain(xp['mode'],xp['expName'],xp['arguments'],launcher) launchTrain(xp['mode'],xp['expName'],xp['arguments'],launcher)
else : else :
print("todo") launchEval(xp['mode'],xp['expName'],launcher)
############################################################################### ###############################################################################
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment