Text classifier has trouble running BERT
See original GitHub issueBug Description
When I try to run a sample code using the text classifier, there is error in loading the BERT checkpoint from google cloud system
“UnimplementedError: File system scheme ‘gs’ not implemented (file: ‘gs://cloud-tpu-checkpoints/bert/keras_bert/uncased_L-12_H-768_A-12\vocab.txt’)”
complete trace : autokeras_error.txt
Bug Reproduction
Code for reproducing the bug:
import autokeras as ak
import numpy as np
clf = ak.TextClassifier(overwrite=True,max_trials=10)
clf.fit(tr_x, tr_y, epochs=1,validation_data=(te_x,te_y))
Data used by the code:
tr_x = np.array(["If you like adult comedy cartoons, like South Park, then this is nearly a similar format about the small adventures of three teenage girls at Bromwell High. Keisha, Natella and Latrina have given exploding sweets and behaved like bitches, I think Keisha is a good leader. There are also small stories going on with the teachers of the school. There's the idiotic principal, Mr. Bip, the nervous Maths teacher and many others. The cast is also fantastic, Lenny Henry's Gina Yashere, EastEnders Chrissie Watts, Tracy-Ann Oberman, Smack The Pony's Doon Mackichan, Dead Ringers' Mark Perry and Blunder's Nina Conti. I didn't know this came from Canada, but it is very good. Very good!",\
"good movie",
"I basically skimmed through the movie but just enough to catch watch the plot was about. To tell you the truth it was kind of boring to me and at some spots it didn't make sense. The only reason I watched this movie in the first place was to see CHACE CRAWFORD!!! He is so hot, but in this movie his hair was kind of weird. But still hot.<br /><br />However, despite how hot CHACE is, it really did not make up for the film. I guess the plot isn't that bad but what really threw me over was the fact that they cuss in like every sentence. Is it that hard to express your anger without saying the F word every time?The cussing was annoying and the whole flashy, camera shaking thing gave me a headache.<br /><br />All in all, although the plot was OK, I found the film to be a bore and over dramatic. That's why I only cut to scenes with CHACE in it. LOL Anyways, not worth renting unless your a die-hard fan of a specific cast member like I was. Oh yeah the cast was Hot. The girls were HOT!!! But CHACE IS THE BEST!!"])
tr_y=np.array(['pos','pos','neg'])
te_x = np.array(["worst Movie","Nice one"])
te_y = np.array(['bad','good'])
Expected Behavior
Setup Details
Include the details about the versions of:
- OS type and version:
- Python: 3.7.9
- autokeras:
- keras-tuner:1.0.3
- scikit-learn:0.23.2
- numpy:1.18.5
- pandas:1.1.5
- tensorflow:2.3.0
Additional context
I installed the following procedure for installation using anaconda prompt:
conda create -n env_autokeras
conda activate env_autokeras
conda install tensorflow
pip install git+https://github.com/keras-team/keras-tuner.git
pip install autokeras
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (3 by maintainers)
Top Results From Across the Web
BERT for Text Classification with NO model training
Are you struggling to classify text data because you don't have a labeled dataset? In this article, using BERT and Python, I will...
Read more >Classify text with BERT | Text - TensorFlow
This tutorial contains complete code to fine-tune BERT to perform sentiment analysis on a dataset of plain-text IMDB movie reviews. In addition to...
Read more >A Simple Guide On Using BERT for Binary Text Classification.
An A-to-Z guide on how you can use Google's BERT for binary text classification tasks with Python and Pytorch. Simple and practical with ......
Read more >BERT | BERT Transformer | Text Classification Using BERT
Why and how to use BERT for NLP Text Classification? download ... A problem here is that the pretrained models will have 15%...
Read more >How to Build a Text Classification Model using BERT and ...
Text classification is a subset of machine learning that classifies text ... In this tutorial, we are solving a text-classification problem.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, it seems the GS file system API is not build for Windows (see https://github.com/tensorflow/tensorflow/issues/38477). The only way to get this working (that I know of, without compiling any sources) is to don’t run with Windows (e.g. Ubuntu / MacOS / Google Colab).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.