Skip to content

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

Description

@sushanth-d

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions