Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'BERT_SPC' When pyabsa-0.9.2.0 #49

Closed
ChrisMengxl opened this issue Aug 6, 2021 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@ChrisMengxl
Copy link

ImportError Traceback (most recent call last)
in
----> 1 from pyabsa import train_apc, apc_config_handler, ABSADatasetList, APCCheckpointManager
2 from pyabsa.model_utils import APCModelList
3
4 save_path = 'state_dict'
5 apc_param_dict_english = apc_config_handler.get_apc_param_dict_english()

~/anaconda3/envs/Py36CUDA110/lib/python3.6/site-packages/pyabsa/init.py in
13 from update_checker import UpdateChecker
14
---> 15 from pyabsa.config.apc_config import apc_config_handler
16 from pyabsa.config.atepc_config import atepc_config_handler
17 from pyabsa.config.classification_config import classification_config_handler

~/anaconda3/envs/Py36CUDA110/lib/python3.6/site-packages/pyabsa/config/apc_config/apc_config_handler.py in
10 from pyabsa.tasks.apc.bert import TNet_LF_BERT
11 from pyabsa.tasks.apc.glove import TNet_LF
---> 12 from pyabsa.tasks.apc.models import BERT_SPC
13
14 # if you find the optimal param set of some situation, e.g., some model on some datasets

ImportError: cannot import name 'BERT_SPC'

@yangheng95
Copy link
Owner

Hello, Can you show me your training code?

@ChrisMengxl
Copy link
Author

Hello, Can you show me your training code?

I think it's my fault.Thx

@yangheng95
Copy link
Owner

I reproduce this error, I will fix it soon, please use 0.9.1.0 before I push the fix patch. Thanks

@yangheng95
Copy link
Owner

It's a strange error, I assume this error was introdcued while I pack the code, now I repack and upload a fix patch 0.9.2.1, you can try it and tell me if the problem continues. Thanks!

@ChrisMengxl
Copy link
Author

It's a strange error, I assume this error was introdcued while I pack the code, now I repack and upload a fix patch 0.9.2.1, you can try it and tell me if the problem continues. Thanks!

Thank you for your project and timely reply. The problem was fixed in Patch 0.9.2.1.

@yangheng95 yangheng95 added the bug Something isn't working label Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants