Skip to content

Training the Parser

AinaIanemahy edited this page Nov 2, 2020 · 6 revisions

This page describes how to train the AM parser and assumes that we have

Further, you need a copy of am-tools.jar in the main directory. You can download it here.

Actual Training

  • In order to make sure that the parser finds all your files, check the contents of configs/data_paths.libsonnet and configs/test_evaluators.libsonnet and validation_evaluators.libsonnet.

  • Pick your graphbank and config file (e.g. jsonnets/single/bert/PSD.jsonnet) make sure that it does what you want (for instance, evaluate on test set after training, yes or no?)

  • Train the model:

python -u train.py jsonnets/single/bert/PSD.jsonnet -s <where to save the model>  -f --file-friendly-logging  -o ' {"trainer" : {"cuda_device" :  <your cuda device>  } }' &> <where to log output>

If you want to use comet, also add these options (before the &>):

--comet <'your API key here'> --project <name of project in comet>

Internal note: If you are training the model on the Saarland server use the nvidia-smi command to get an overview over the available GPUs. Choose one of the GPUs as <your cuda device>.

Clone this wiki locally