jasmine95dn / kaping_prompt_zero-shot

This contains script that reimplements KAPING framework (Knowledge-Augmented Language Model Prompting for Zero-Shot Knowledge Graph Question Answering, Baek et al. 2023)
21 stars 2 forks source link

IndentationError: unindent does not match any outer indentation level #4

Open lingvisa opened 4 months ago

lingvisa commented 4 months ago

I downloaded file from here:

https://raw.githubusercontent.com/amazon-science/mintaka/main/data/mintaka_test.json

Then run

python run.py --input data/mintaka_test.json

But received this error message:

 python run.py --input data/mintaka_test.json 
/Users/I7474/ai/kaping_prompt_zero-shot/kaping-env/lib/python3.11/site-packages/transformers/utils/generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
  _torch_pytree._register_pytree_node(
/Users/I7474/ai/kaping_prompt_zero-shot/kaping-env/lib/python3.11/site-packages/transformers/utils/generic.py:309: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
  _torch_pytree._register_pytree_node(
Traceback (most recent call last):
  File "/Users/I7474/ai/kaping_prompt_zero-shot/run.py", line 1, in <module>
    from kaping.model import pipeline
  File "/Users/I7474/ai/kaping_prompt_zero-shot/kaping/model.py", line 6, in <module>
    from kaping.entity_verbalization import RebelEntityVerbalizer
  File "/Users/I7474/ai/kaping_prompt_zero-shot/kaping/entity_verbalization.py", line 31
    relation, subject, relation, object_ = '', '', '', ''
                                                         ^
IndentationError: unindent does not match any outer indentation level

I am using Python 11. Is that a test data format error? Did you use the same test data format as shown in the link above?

lingvisa commented 4 months ago

Screenshot 2024-06-25 at 2 51 32 PM

I git clone the code and somehow this part of code has formatting error.