chiayewken / Span-ASTE

Code Implementation of "Learning Span-Level Interactions for Aspect Sentiment Triplet Extraction".
MIT License
168 stars 43 forks source link

An error for Posixpath #37

Open Chen-PengF opened 1 year ago

Chen-PengF commented 1 year ago

Hi, I have some questions to ask you.

The params_file is a string type, but this error has occurred as follow:

Traceback (most recent call last): File "/Span-ASTE-main/aste/wrapper.py", line 177, in model.fit(path_train, path_dev) File "/Span-ASTE-main/aste/wrapper.py", line 54, in fit test_data_path=str(self.save_temp_data(path_dev, "dev")), File "/lib/python3.7/site-packages/allennlp/common/params.py", line 462, in from_file file_dict = json.loads(evaluate_file(params_file, ext_vars=ext_vars)) TypeError: argument 1 must be str, not PosixPath

By the way, what should I start your code, the "main.py" or "wrapper.py".

chiayewken commented 1 year ago

Hi, please use wrapper.py, I have updated the colab demo and demo.ipynb to the latest version