Problem with deleting supposed .pyabsa folder

Hello Community, I’m Luis Fernando Pazos. Im a begginer Python developer with experience in RPA field in low code tools. Now Im trying to learn more about Python, machine learning, RAG, etc. Happy to have found this space to hopefully solve some of my problems while trying to develop some projects.

For now I’m trying to work with PyABSA for Aspect Based Sentiment Analysis. For now im just going through the examples folder to learn about the library and its functions, etc.

This is the first code Im trying to execute

from pyabsa import ABSAInstruction

if __name__ == "__main__":
    generator = ABSAInstruction.ABSAGenerator("multilingual")
    example = [
        "The food is good, but the service is bad.",
        "The laptop is good, but the battery life is bad.",
    ]

    for example in example:
        result = generator.predict(example)
        print(result)

and im getting this error:
Traceback (most recent call last): File “C:\Users\pazos\Documents\vs\demo\pyabsa_env\Lib\site-packages\pyabsa\tasks\AspectPolarityClassification\prediction\sentiment_classifier.py”, line 83, in init self.model = APCEnsembler( ^^^^^^^^^^^^^ File “C:\Users\pazos\Documents\vs\demo\pyabsa_env\Lib\site-packages\pyabsa\tasks\AspectPolarityClassification\instructor\ensembler.py”, line 79, in init [ File “C:\Users\pazos\Documents\vs\demo\pyabsa_env\Lib\site-packages\pyabsa\tasks\AspectPolarityClassification\instructor\ensembler.py”, line 80, in str(self.config.args[k]) File “C:\Users\pazos\Documents\vs\demo\pyabsa_env\Lib\site-packages\transformers\tokenization_utils_base.py”, line 1511, in repr f" special_tokens={self.special_tokens_map}, clean_up_tokenization_spaces={self.clean_up_tokenization_spaces}," ^^^^^^^^^^^^^^^^^^^^^^^ File “C:\Users\pazos\Documents\vs\demo\pyabsa_env\Lib\site-packages\transformers\tokenization_utils_base.py”, line 1111, in getattr raise AttributeError(f"{self.class .name } has no attribute {key}") AttributeError: DebertaV2TokenizerFast has no attribute special_tokens_map. Did you mean: ‘get_special_tokens_mask’? During handling of the above exception, another exception occurred: Traceback (most recent call last): File “C:\Users\pazos\Documents\vs\demo\PYABSA\examples-v2\aspect_polarity_classification\inference.py”, line 15, in sent_classifier = APC.SentimentClassifier(“multilingual”, max_seq_len=512) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “C:\Users\pazos\Documents\vs\demo\pyabsa_env\Lib\site-packages\pyabsa\tasks\AspectPolarityClassification\prediction\sentiment_classifier.py”, line 104, in init raise RuntimeError( RuntimeError: Fail to load the model from multilingual! Please make sure the version of checkpoint and PyABSA are compatible. Try to remove he checkpoint and download again Exception: DebertaV2TokenizerFast has no attribute special_tokens_map

I asked to Claude and said that the error could be solve by downgrading the Transaformers, which I did to 4.29.0.
And also clear the PyABSA cache which it says that it shoul be on some folder called .pyabsa.
I have search for this folder in my system but haven´t found it.

Any suggestion?

You might have better luck asking about this on a more specific forum: https://github.com/yangheng95/PyABSA/discussions

This immediately stands out:

example = [
        "The food is good, but the service is bad.",
        "The laptop is good, but the battery life is bad.",
    ]

    for example in example:

You cannot use a for loop like this. The array is likely supposed to be called examples since it has many examples and you want to access one example at a time.

It doesn’t seem like your code is getting that far though.

You can learn Python here https://www.freecodecamp.org/learn/scientific-computing-with-python/

Hi @pkdvalis Thank you for the resource.
I did not notice the for loop issue, that is actually how the code from github is so you might have discovered an issue from the source.
But you’re right my code does not reach that far jaja

Actually it seems that the for loop does run, so it’s “ok”.

There’s a global scope example and the for loop scope example. It runs but… it’s not good.

Thank you, Yet Im still facing me initial problem which is not finding the payabsa cache folder

Again, you should follow up on the github for that project https://github.com/yangheng95/PyABSA/discussions