Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
nlp
ahisto-modules
Named Entity Recognition Experiments
Commits
63d085bd
Commit
63d085bd
authored
Aug 11, 2022
by
Vít Novotný
Browse files
Automatically select GPU in `scripts/03_train_ner_models.sh`
parent
7c0a4044
Pipeline
#146452
passed with stage
in 8 minutes and 32 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scripts/03_train_ner_models.sh
View file @
63d085bd
...
...
@@ -11,9 +11,9 @@ OCR_EVAL_PATH=/nlp/projekty/ahisto/ahisto-ocr-eval
DOCKER_BUILDKIT
=
1 docker build
--build-arg
UID
=
"
$(
id
-u
)
"
--build-arg
GID
=
"
$(
id
-g
)
"
--build-arg
UNAME
=
"
$(
id
-u
-n
)
"
.
-f
scripts//03_train_ner_models.Dockerfile
-t
"
$IMAGE_NAME
"
parallel
--halt
=
soon,fail
=
100%
--jobs
=
100%
--resume-failed
--bar
--delay
30
\
--joblog
=
scripts/03_train_ner_models.joblog
\
parallel
--halt
=
soon,fail
=
100%
--jobs
=
100%
--bar
--delay
60
\
--colsep
' +'
\
--
\
docker run
--rm
-u
"
$(
id
-u
)
:
$(
id
-g
)
"
--hostname
"
$HOSTNAME
"
--runtime
=
nvidia
-e
CUDA_DEVICE_ORDER
=
PCI_BUS_ID
-e
NVIDIA_VISIBLE_DEVICES
={
4
}
-e
TOKENIZERS_PARALLELISM
=
false
-e
COMET_API_KEY
-v
"
$PWD
"
/..:/workdir:rw
-w
/workdir/
"
${
PWD
##*/
}
"
-v
"
$ROOT_PATH
"
:
"
$ROOT_PATH
"
:rw
-v
"
$ANNOTATION_PATH
"
:
"
$ANNOTATION_PATH
"
:ro
-v
"
$OCR_EVAL_PATH
"
:
"
$OCR_EVAL_PATH
"
:ro
"
$IMAGE_NAME
"
nice
-n
19 python scripts/03_train_ner_models.py
{
1
}
{
2
}
{
3
}
\
:::: scripts/03_train_ner_models.tasks
--
'
GPU_ID=$(nvidia-smi | grep -F -B 1 -- "0MiB / 15360MiB" | head -n 1 | awk "{ print \$2 }")
docker run --rm -u "$(id -u):$(id -g)" --hostname "'
"
$HOSTNAME
"
'" --runtime=nvidia -e CUDA_DEVICE_ORDER=PCI_BUS_ID -e NVIDIA_VISIBLE_DEVICES="$GPU_ID" -e TOKENIZERS_PARALLELISM=false -e COMET_API_KEY -v "$PWD"/..:/workdir:rw -w /workdir/"${PWD##*/}" -v "'
"
$ROOT_PATH
"
'":"'
"
$ROOT_PATH
"
'":rw -v "'
"
$ANNOTATION_PATH
"
'":"'
"
$ANNOTATION_PATH
"
'":ro -v "'
"
$OCR_EVAL_PATH
"
'":"'
"
$OCR_EVAL_PATH
"
'":ro "'
"
$IMAGE_NAME
"
'" nice -n 19 python scripts/03_train_ner_models.py {1} {2} {3}
'
:::: scripts/03_train_ner_models.tasks
scripts/03_train_ner_models.tasks
View file @
63d085bd
manatee non-crossing only-relevant
1
manatee all only-relevant
2
fuzzy-regex non-crossing only-relevant
3
fuzzy-regex all only-relevant
4
manatee non-crossing all
5
manatee all all
10
fuzzy-regex non-crossing all
12
fuzzy-regex all all
13
manatee non-crossing only-relevant
manatee all only-relevant
fuzzy-regex non-crossing only-relevant
fuzzy-regex all only-relevant
manatee non-crossing all
manatee all all
fuzzy-regex non-crossing all
fuzzy-regex all all
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment