ScalaConsultants / Aspect-Based-Sentiment-Analysis

💭 Aspect-Based-Sentiment-Analysis: Transformer & Explainable ML (TensorFlow)
Apache License 2.0
543 stars 90 forks source link

Training custom model #44

Closed chetanniradwar closed 1 year ago

chetanniradwar commented 3 years ago

I want to use this package for the mobile phone's ABSA, Can anyone tell me how to train the model and use the trained model in the nlp.load() method. Actually, I am new to the NLP. Can anyone show the code to do that? Also, I don't know what I have to do after running the script "train_classifier.py". This script also showing an error that to "upgrade storage by giving database path " when running this on google collab !python /content/Aspect-Based-Sentiment-Analysis/examples/train_classifier.py --domain Smartphones.

 Traceback (most recent call last):
  File "/content/Aspect-Based-Sentiment-Analysis/examples/train_classifier.py", line 183, in <module>
    load_if_exists=True)
  File "/usr/local/lib/python3.7/dist-packages/optuna/study.py", line 1055, in create_study
    storage = storages.get_storage(storage)
  File "/usr/local/lib/python3.7/dist-packages/optuna/storages/__init__.py", line 27, in get_storage
    return _CachedStorage(RDBStorage(storage))
  File "/usr/local/lib/python3.7/dist-packages/optuna/storages/_rdb/storage.py", line 173, in __init__
    self._version_manager.check_table_schema_compatibility()
  File "/usr/local/lib/python3.7/dist-packages/optuna/storages/_rdb/storage.py", line 1288, in check_table_schema_compatibility
    raise RuntimeError(message)
RuntimeError: The runtime optuna version 2.5.0 is no longer compatible with the table schema (set up by optuna 2.2.0). Please execute "$ optuna storage upgrade --storage $STORAGE_URL" for upgrading the storage.

The stepwise guide would be awesome. Thanks for such a good package.

pepi99 commented 2 years ago

any solution?

abaveja313 commented 1 year ago

Is there a solution yet @rolczynski ?