GXimingLu/neurologic_decoding

AttributeError: 'ConstrainedHypothesis' object has no attribute 'met_process'

Closed this issue · 1 comments

Hello,
When trying to run the mt neurologic decoding, I get the following error:

Traceback (most recent call last):
  File "decode.py", line 99, in <module>
    main()
  File "decode.py", line 85, in main
    sat_tolerance=args.sat_tolerance)
  File "/home/nlp/sloboda1/anaconda3/envs/hug/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context
    return func(*args, **kwargs)
  File "/home/nlp/sloboda1/controlled_reduction/decoding_approaches/neurologic_decoding/mt/generate.py", line 341, in generate
    model_specific_kwargs=model_specific_kwargs,
  File "/home/nlp/sloboda1/controlled_reduction/decoding_approaches/neurologic_decoding/mt/generate.py", line 528, in _generate_beam_search
    num_fill=2 * num_beams)
  File "/home/nlp/sloboda1/controlled_reduction/decoding_approaches/neurologic_decoding/mt/topK_parallel.py", line 152, in topk_huggingface
    num_fill=num_fill)
  File "/home/nlp/sloboda1/controlled_reduction/decoding_approaches/neurologic_decoding/mt/topK_parallel.py", line 253, in _sequential_topk
    all_orders = set([x.hypothesis.met_process() for x in sorted_candidates])
  File "/home/nlp/sloboda1/controlled_reduction/decoding_approaches/neurologic_decoding/mt/topK_parallel.py", line 253, in <listcomp>
    all_orders = set([x.hypothesis.met_process() for x in sorted_candidates])
AttributeError: 'ConstrainedHypothesis' object has no attribute 'met_process'

So, I just want to make sure: the met_process() function in the mt/topK_parallel.py file was supposed to be met_order(), as in the other topK.py files, right?
Thanks!

yes, met_process() should be the same.