Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
old_macaon_data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Franck Dary
old_macaon_data
Commits
acbb3ff1
Commit
acbb3ff1
authored
5 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
updated script to launch on cluster
parent
42295e2b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
UD_any/launchForCluster.py
+21
-9
21 additions, 9 deletions
UD_any/launchForCluster.py
with
21 additions
and
9 deletions
UD_any/launchForCluster.py
+
21
−
9
View file @
acbb3ff1
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment