Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional setup steps required to get everything working #1

Open
jakpra opened this issue Jul 8, 2020 · 0 comments
Open

Additional setup steps required to get everything working #1

jakpra opened this issue Jul 8, 2020 · 0 comments

Comments

@jakpra
Copy link
Member

jakpra commented Jul 8, 2020

Most of the information about how to setup inference and training runs is present in the readme, but there are a few gaps.
Here are the additional steps I had to take in order to make inference with a pretrained model work:

  • pip install -r requirements.txt
  • pip install pytorch_pretrained_bert
  • pip install pycorenlp
  • install CoreNLP
  • sh download_artifacts.sh
    • this is listed as a step for training a model, but it's also necessary if you just want to run inference
    • before running it for the first time, uncomment the commented lines (though I don't think GloVe is needed)
    • after running it, rename the config file to just config.json and the vocab file to just vocab.txt in bert-base-cased/
    • make sure bert-base-cased/ is one level above from the AMR-gs top-level directory; i.e., from within AMR-gs, the relative path should be ../bert-base-cased/ (unfortunately this relative path is currently expected by the pretrained model)
  • make sure that all (train/dev/test) data is reachable from AMR-gs via data/AMR/amr_2.0 (or data/AMR/amr_1.0)
    • this will be done automatically if you run prepare_data.sh on one of the LDC AMR corpora, but if you use custom datasets you may have to do it manually, e.g., with symbolic links: ln -s actual/path/to/data path-to-AMR-gs/data/AMR/amr_2.0
  • make sure the pretrained vocabulary files at, e.g., amr2.0.bert.gr/vocabs/ are reachable from AMR-gs at data/AMR/amr_2.0_reca/, e.g., with symbolic links ln -s amr2.0.bert.gr/vocabs/ path-to-AMR-gs/data/AMR/amr_2.0_reca/
  • the machine learning code in parser/ expects a GPU/CUDA setup; if you want to run on CPU (but also in general) it is preferable to use the version of the files fixed in c795b88
  • NOW you can proceed to follow the instructions in the readme for AMR Parsing with Pretrained Models
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant