How should I install and import simpletransformers?

I have been using the following conda & python verison: conda version : 4.6.14 conda-build version : 3.17.8 python version : 3.7.3.final.0 I installed simpletransformers in the following...

BERT binary Textclassification get different results every run

I do binary text classification with BERT from the Simpletransformer. I work in Colab with GPU runtime type. I have generated train and test set with the sklearn StratifiedKFold Method. I have two...

RoBERTa classification RuntimeError: shape '[-1, 9]' is invalid for input of size 8

m = MultiLabelBinarizer() X = pd.read_csv('data/data.csv', sep=None, engine='python') X = X.dropna() Y_train = m.fit_transform(X['labels']) Y_train2 = [list(i) for i in...

from pytorch_transformers ModuleNotFoundError: No module named 'utils'

I am running into this error when using pytorch_transformers in Colab environment after installing Anaconda and activating it. I found a similar issue in...

Fine tuning a pretrained language model with Simple Transformers

In his article 'Language Model Fine-Tuning For Pre-Trained Transformers' Thilina Rajapakse (https://medium.com/skilai/language-model-fine-tuning-for-pre-trained-transformers-b7262774a7ee) provides...

What framework should I use to multi-label classification with thousands of labels

I'm working now on multi-label classification service and currently I have prepared training dataset. The problem is that current training dataset has a lot of different labels (around 80 000). At...

simpletransformers model trained on Colab doesn't work locally

I've followed the instructions in this link and trained a BERT model on Google Colab. I then downloaded it and tried to use it locally on my computer. But something went wrong. Here is my code for...

Python "Can't pickle local object" exception during BertModel training

I am using simpletransformers.classification to train a Bert moder to classify some text inputs. Here is my code. from simpletransformers.classification import ClassificationModel import...

How do you load a simpletransformers model from a checkpoint?

I'm using simpletransformers (https://github.com/ThilinaRajapakse/simpletransformers) for a work project. After training a model, I get a bunch of files dumped to the output folder. I was...

Running simple transformers to test NER is causing the error. Any solutions?

I am trying to test this https://github.com/ThilinaRajapakse/simpletransformers#minimal-start NER using simple transformers and facing the following error. can someone guide me with this issue? I...

Getting an error(cannot import name 'BertPreTrainedModel') while importing classification model from simpletransformers

Getting the following error while trying to import the classificationmodel from simpletransformers. ImportError Traceback (most recent call...

Higher Accuracy using SimpleTransformers vs Transformers Library with BERT

I am working on a project for text classification using BERT I am getting ca. 90% accuracy by using simple transformers. But I only get like 60% using my own training for-loop (not published here)...

BERT always predicts same class (Fine-Tuning)

I am fine-tuning BERT on a financial news dataset. Unfortunately BERT seems to be trapped in a local minimum. It is content with learning to always predict the same class. balancing the dataset...

'use_cuda' set to True when cuda is unavailable. Make sure CUDA is available or set use_cuda=False

I am trying to create a Bert model for classifying Turkish Lan. here is my code: import pandas as pd import torch df = pd.read_excel (r'preparedDataNoId.xlsx') df = df.sample(frac = 1) from...

why is my fastapi or uvicorn getting shutdown?

I am trying to run a service that uses simple transformers Roberta model to do classification. the inferencing script/function itself is working as expected when tested. when i include that with...

"[ERROR] OSError: [Errno 30] Read-only file system" when using simpletransformers on lambda docker

I am getting the following error when testing my lambda function on AWS using a Docker image. The model is a simpletransformers classification model. The testing worked just fine locally. [ERROR]...

wandb - RuntimeError: CUDA out of memory

I'm trying to run the model given in the hyperparameter optimization example from the simple transformers documentation, but while searching for hyperparameters after a certain number of...

SimpleTransformers Error: VersionConflict: tokenizers==0.9.4? How do I fix this?

I'm trying to execute the simpletransformers example from their site on google colab. Example: from simpletransformers.classification import ClassificationModel, ClassificationArgs import pandas...

AttributeError: 'str' object has no attribute 'to' while training QuestionAnsweringModel from simpletransformers

I'm trying to train QuestionAnsweringModel bert-base-multilingual-uncased from simpletransformers and faced next problem: AttributeError Traceback (most recent call...

'google.protobuf.descriptor' has no attribute '_internal_create_key'

I get the following error when trying to import simpletransformers: Traceback (most recent call last): File "...py", line 106, in <module> from simpletransformers.classification import...

Hot to get top generated text of T5 transformers?

I trained a T5 transformers using simpletransformers libarary. Here is a code to get the predictions: pred_values = model.predict(input_values) However, it just returns the top or greedy...

Error while loading fine-tuned simpletransformer model in Docker Container

I am saving and loading a model using torch.save() and torch.load() commands. While loading a fine-tuned simple transformer model in Docker Container, I am facing this error which I am not able to...

cannot import name 'T5Tokenizer' from 'transformers.models.t5'

As you see in the following python console, I can import T5Tokenizer from transformers. However, for simpletransformers.t5 I get an error: >>> from transformers import T5Model, T5Tokenizer >>>...

"PanicException: no entry found for key" error running simpletransformers on Google Colab

I encountered this error while running simpletransformers on Google Colab. I enabled h/w accelerator as GPU and ran the code. from simpletransformers.classification import ClassificationModel #...

Not able to use NERModel due to import issue from SimpleTransformers

I'm trying to use SimpleTransformers module for this competition. After successfully installing the package SimpleTransformers in kernel , i'm trying to import NERModel and NERArgs packages from...