yangheng95 / PyABSA

Sentiment Analysis, Text Classification, Text Augmentation, Text Adversarial defense, etc.;
https://pyabsa.readthedocs.io
MIT License
937 stars 159 forks source link

inferring script error: in data_utils_for_inferring #21

Closed tusharkgerg closed 3 years ago

tusharkgerg commented 3 years ago

Traceback (most recent call last): File "/home/tushar/sent-anal/LC-ABSA/inferring.py", line 100, in configs = parse_experiments('inferring_config.json') File "/home/tushar/sent-anal/LC-ABSA/modules/utils/data_utils_for_inferring.py", line 50, in parse_experiments parser.add_argument('--window', default=config['window'], type=str) KeyError: 'window'

Another error (in older march 2021 repo). data_utils_for_inferring.py script fails for lines with 2 or more aspect positions. For example in twitter data, train file as ...$T...$T... : no problem test file also has multiple aspect positions, but data_utils_for_inferring.py fails while splitting this.

yangheng95 commented 3 years ago

Have you triey the pyabsa? it is hard to maintain inferring script for models with different input and architecture, so I detached the train an inference for BERT based models into pyabsa

yangheng95 commented 3 years ago

The latest release code provides a integrated inference function now, please try.

tusharkgerg commented 3 years ago

Thanks @yangheng95