IBM / transition-amr-parser

SoTA Abstract Meaning Representation (AMR) parsing with word-node alignments in Pytorch. Includes checkpoints and other tools such as statistical significance Smatch.
Apache License 2.0
231 stars 46 forks source link

Question about installation #40

Closed tingchihc closed 1 year ago

tingchihc commented 1 year ago

In readme, you say we should build up a set_environment.sh. Also, in some issues, some people think the set_environment.sh is based on our environment. Could you explain how to build up set_environment.sh by myself clearly?

In addition, I have another problem with git checkout <branch>. I do not know which information should I put in this branch. My goal is to use from transition_amr_parser.stack_transformer_amr_parser import AMRParser. I think there is something wrong with my installation. I often receive the error message like AttributeError: module 'torch.utils.data' has no attribute 'IterableDataset'. It looks related to fairseq. Could you tell me the potential problem?

thanks.

ramon-astudillo commented 1 year ago

You can see an example of a set_environment.sh here https://github.com/IBM/transition-amr-parser#installation, but if you have your own way of activating you virtual environment or you don't use it, just leave it empty.

To use the stack-transformer you need to use the stack-transformer branch as indicated here https://github.com/IBM/transition-amr-parser#stack-transformer . That code-base is some years old now. It is likely using older versions of fairseq and torch, so be sure to first checkout the branch and then install.

The last error seems to be a problem with torch version. See point above.

tingchihc commented 1 year ago

thanks for your help. I will check the version carefully.