Closed subhadip10 closed 3 years ago
Hi @subhadip10
Thanks for the feedback.
Your code is not 100% complete, I have tried to fill in the gaps in the code snippet below.
With the latest release of NERDA
(0.9.7) I am not able reproduce the error.
Please try upgrading NERDA and check if the error persists. If so, please get back to me, and I will take a look at it. Until then, I will close this issue.
Best, Lars
from NERDA.datasets import get_conll_data, download_conll_data
download_conll_data()
training = get_conll_data('train')
validation = get_conll_data('valid')
transformer = 'bert-base-uncased'
tag_scheme = ['B-PER',
'I-PER',
'B-ORG',
'I-ORG',
'B-LOC',
'I-LOC',
'B-MISC',
'I-MISC']
hyperparameters = {'epochs' : 3,
'warmup_steps' : 10,
'train_batch_size': 5,
'learning_rate': 0.0001}
from NERDA.models import NERDA
model = NERDA(
dataset_training = training,
dataset_validation = validation,
tag_scheme = tag_scheme,
tag_outside = 'O',
transformer = transformer,
hyperparameters = hyperparameters
)
model.train()
transformers.version == '4.1.0.dev0' torch.version == '1.7.0+cu92'
Code
import numpy as np from NERDA.datasets import get_conll_data, download_conll_data download_conll_data() training = get_conll_data('train') validation = get_conll_data('valid')
transformer = 'bert-base-uncased'
from NERDA.models import NERDA model = NERDA( dataset_training = training, dataset_validation = validation, tag_scheme = tag_scheme, tag_outside = 'O', transformer = transformer, dropout = dropout, hyperparameters = training_hyperparameters )
model.train()
TypeError Traceback (most recent call last)