yanzhh / HGERE

Source Code for "Joint Entity and Relation Extraction with Span Pruning and Hypergraph Neural Networks"
MIT License
22 stars 2 forks source link

I'm facing a problem when trying to run the run_hgnn.py script. #6

Open Chenwbsjfk opened 2 months ago

Chenwbsjfk commented 2 months ago

Traceback (most recent call last): File "run_hgnn.py", line 41, in from transformers import (WEIGHTS_NAME, BertConfig, ImportError: cannot import name 'BertForHyperGNN' from 'transformers'

yanzhh commented 2 months ago

The error was due to the missing import statement for the class in the file "transformers/src/transformers/_init_.py". I have corrected two files: "transformers/src/transformers/_init_.py" and "run_hgnn.py" and they have been updated now.