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

updated script to launch on cluster

parent 42295e2b
Branches
No related tags found
No related merge requests found
......@@ -19,10 +19,23 @@ configPrefix = "UD_ROOT=~/ud/ud-treebanks-all/"
commandStr = "./train.sh . %s %s --interactive 0 --printTime %s"
def waitUntilDirExists(dirPath) :
time.sleep(2.0)
while not os.path.isdir(dirPath) :
time.sleep(0.5)
time.sleep(2.0)
def waitUntilFileExists(filePath) :
time.sleep(2.0)
while not os.path.isfile(filePath) :
time.sleep(2.0)
def launchExperiment(jobName,lang,template,nbCpus=1,partition='skylake',time='2-00',moreArgs='') :
print(configPrefix+lang+'/', file=open('config', 'w'))
os.system("cd data && make clean && make && cd ..")
waitUntilFileExists('data/tagger.as')
def launchExperiment(jobName,lang,template,nbCpus=1,partition='skylake',time='1-00',moreArgs='') :
slurmFile = open('script.slurm', 'w')
jobName += '_' + lang
......@@ -47,10 +60,6 @@ def launchExperiment(jobName,lang,template,nbCpus=1,partition='skylake',time='1-
slurmFile.close()
print(configPrefix+lang+'/', file=open('config', 'w'))
os.system("cd data && make clean && make && cd ..")
os.system("sbatch script.slurm")
waitUntilDirExists('bin/'+jobName+'/data/')
......@@ -59,11 +68,14 @@ def launchExperiment(jobName,lang,template,nbCpus=1,partition='skylake',time='1-
if __name__ == "__main__" :
templatesExperiments = \
[\
{'jobName' : 'morpho_classic','template' : 'morpho_parts','moreArgs' : '-n 10'},\
{'jobName' : 'tagger_classic','template' : 'tagger','moreArgs' : '-n 10'},\
{'jobName' : 'tagparser','template' : 'tagparser','moreArgs' : '-n 15'},\
{'jobName' : 'tagparser_sequential','template' : 'tagparser_sequential','moreArgs' : '-n 15'},\
{'jobName' : 'tagparser_sequential_strong','template' : 'tagparser_sequential_strong','moreArgs' : '-n 15','nbCpus' : 2},\
{'jobName' : 'tokeparser','template' : 'tokeparser','moreArgs' : '-n 15 --rawInput'},\
{'jobName' : 'tokeparser_incremental','template' : 'tokeparser_incremental','moreArgs' : '-n 15 --rawInput'},\
]\
langs = ["UD_French-GSD", "UD_Hebrew-HTB"]
langs = ["UD_French-GSD", "UD_Hebrew-HTB", "UD_Chinese-GSD", "UD_English-EWT"]
for experience in templatesExperiments :
for lang in langs :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment