yangheng95 / PyABSA

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

Can't use local path dataset #177

Closed radya13rahman closed 2 years ago

radya13rahman commented 2 years ago

image I've entered a path like this and am trying to use the existing dataset on my github (the github branch I've forked from the main github). But the code always fetches the dataset from the main github not from the fork and when I want to use a custom dataset an exception appears as above.

radya13rahman commented 2 years ago

Here the exception image

yangheng95 commented 2 years ago

Try:

from pyabsa.functional.dataset import DatasetItem
dataset_path = DatasetItem('100.CustomDataset')

then use it in your code

radya13rahman commented 2 years ago

Thanks, Mr Heng in the config manager code

I also want to ask why when I have changed the target repository that was cloned but the results still point to your repository?

Here's the code I edited image

yangheng95 commented 2 years ago

You need to remove downloaded datasets

radya13rahman commented 2 years ago
import sys
sys.path.append('..')

from pyabsa.functional.dataset import DatasetItem
from pyabsa.functional import ATEPCConfigManager
from pyabsa.functional import ABSADatasetList
from pyabsa.functional import Trainer, ATEPCTrainer
from pyabsa.functional import ATEPCModelList
import os

I want to run the code locally but when I run this code, there is always an exception that there is no pyabsa module. how to solve it? image

yangheng95 commented 2 years ago

please make sure that you properly installed the package

yangheng95 commented 2 years ago

or the relative path is correct