Skip to content
New issue

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

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

Already on GitHub? # to your account

"python train.py" command fails without AMR server #13

Open
sushanth-d opened this issue Jan 13, 2023 · 0 comments
Open

"python train.py" command fails without AMR server #13

sushanth-d opened this issue Jan 13, 2023 · 0 comments

Comments

@sushanth-d
Copy link

Hi!
Thank you releasing this repo!

I am attempting to train a LOA model by running the command:

python train.py

As I understand from the readme file, setting up AMR server is not necessary for training. Instead we can use the pkl file which can be obtained by running the following two commands:

mkdir -p cache
wget -O cache/amr_cache.pkl https://ibm.box.com/shared/static/klsvx54skc5wlf35qg3klo35ex25dbb0.pkl 

However, attempting to train using the pkl file results in the error with the message:

Exception: Need the AMR server for "On the desk you make out a clean red dress."

The full traceback of the error:

Found 32 observations
Mincount:  8
AMR is cache only mode
Loaded cache from ./cache/amr_cache.pkl len: 241
  3%|█████▏                                                                                                                                                                 | 1/32 [00:00<00:07,  4.24it/s]
Traceback (most recent call last):
  File "train.py", line 88, in <module>
    loa_agent.extract_fact2logic(difficulty_level=args.difficulty_level,
  File "/home/sushanth/Desktop/eee587/loa/loa_agent.py", line 633, in extract_fact2logic
    get_verbnet_preds_from_obslist(
  File "/home/sushanth/Desktop/eee587/loa/amr_parser.py", line 60, in get_verbnet_preds_from_obslist
    rest_amr.obs2facts(obs_text,
  File "/home/sushanth/Desktop/eee587/loa/amr_parser.py", line 380, in obs2facts
    ret = self.text2amr(text)
  File "/home/sushanth/Desktop/eee587/loa/amr_parser.py", line 143, in text2amr
    raise Exception('Need the AMR server for "' + sent + '"')
Exception: Need the AMR server for "On the desk you make out a clean red dress."

So could you please let me know whether training is not possible without setting up the AMR server? If it is possible, what might be the issue here?
Any insights you might have will be helpful.

Thanks!

PS: I was successfully able to run the nesa-demo repo and visualise the workings of a trained LOA model. So, I am sure the requirements are all good.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant