You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from pyabsa import ModelSaveOption, DeviceTypeOption
import warnings
warnings.filterwarnings("ignore")
from pyabsa import AspectPolarityClassification as APC
config = APC.APCConfigManager.get_apc_config_english()
from pyabsa import ModelSaveOption, DeviceTypeOption
config.num_epoch = 1
config.model = APC.APCModelList.FAST_LSA_T_V2
trainer = APC.APCTrainer(
config=config,
dataset=my_dataset,
from_checkpoint="english",
# if you want to resume training from our pretrained checkpoints, you can pass the checkpoint name here
auto_device=DeviceTypeOption.AUTO,
path_to_save=None, # set a path to save checkpoints, if it is None, save checkpoints at 'checkpoints' folder
checkpoint_save_mode=ModelSaveOption.SAVE_MODEL_STATE_DICT,
load_aug=False,
# there are some augmentation dataset for integrated datasets, you use them by setting load_aug=True to improve performance
)
and getting RuntimeError: Error(s) in loading state_dict for APCEnsembler:
The text was updated successfully, but these errors were encountered:
Using APC trainer on Politic dataset of PyAbsa datset
my code :
from pyabsa import download_all_available_datasets
download_all_available_datasets()
my_dataset = DatasetItem("/kaggle/working/integrated_datasets/datasets/apc_datasets/99.PoliticalData/custom.train.txt")
from pyabsa import ModelSaveOption, DeviceTypeOption
import warnings
warnings.filterwarnings("ignore")
from pyabsa import AspectPolarityClassification as APC
config = APC.APCConfigManager.get_apc_config_english()
from pyabsa import ModelSaveOption, DeviceTypeOption
config.num_epoch = 1
config.model = APC.APCModelList.FAST_LSA_T_V2
trainer = APC.APCTrainer(
config=config,
dataset=my_dataset,
from_checkpoint="english",
# if you want to resume training from our pretrained checkpoints, you can pass the checkpoint name here
auto_device=DeviceTypeOption.AUTO,
path_to_save=None, # set a path to save checkpoints, if it is None, save checkpoints at 'checkpoints' folder
checkpoint_save_mode=ModelSaveOption.SAVE_MODEL_STATE_DICT,
load_aug=False,
# there are some augmentation dataset for integrated datasets, you use them by setting load_aug=True to improve performance
)
and getting RuntimeError: Error(s) in loading state_dict for APCEnsembler:
The text was updated successfully, but these errors were encountered: