Comments (10)
from lit.
Sorry! That path is used to save the predictions cache between runs, but you can disable it with the flag --data-dir=""
(see https://github.com/PAIR-code/lit/blob/main/lit_nlp/server_flags.py#L43)
FYI: we haven't tested LIT on Windows at all, so can't guarantee that other issues won't pop up here.
from lit.
from lit.
Hi There, I have resolved the issue but there is no index file is present...
Kindly resolve the issue
(lit-nlp) C:~\lit>python -m lit_nlp.examples.quickstart_sst_demo --port=5432
2020-08-24 10:26:15.605109: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
I0824 10:26:15.623712 44212 quickstart_sst_demo.py:47] Working directory: C:\Users\SB0079~1\AppData\Local\Temp\tmp27r8f4_x
W0824 10:26:15.864023 44212 dataset_builder.py:575] Found a different version 1.0.0 of dataset glue in data_dir C:\Users\SB00790107\tensorflow_datasets. Using currently defined version 0.0.2.
I0824 10:26:15.864023 44212 dataset_builder.py:184] Overwrite dataset info from restored data version.
I0824 10:26:15.867015 44212 dataset_builder.py:253] Reusing dataset glue (C:\Users\SB00790107\tensorflow_datasets\glue\sst2\0.0.2)
I0824 10:26:15.867015 44212 dataset_builder.py:399] Constructing tf.data.Dataset for split train, from C:\Users\SB00790107\tensorflow_datasets\glue\sst2\0.0.2
W0824 10:26:15.867015 44212 dataset_builder.py:439] Warning: Setting shuffle_files=True because split=TRAIN and shuffle_files=None. This behavior will be deprecated on 2019-08-06, at which point shuffle_files=False will be the default for all splits.
W0824 10:26:23.170175 44212 dataset_builder.py:575] Found a different version 1.0.0 of dataset glue in data_dir C:\Users\SB00790107\tensorflow_datasets. Using currently defined version 0.0.2.
I0824 10:26:23.171172 44212 dataset_builder.py:184] Overwrite dataset info from restored data version.
I0824 10:26:23.174169 44212 dataset_builder.py:253] Reusing dataset glue (C:\Users\SB00790107\tensorflow_datasets\glue\sst2\0.0.2)
I0824 10:26:23.174169 44212 dataset_builder.py:399] Constructing tf.data.Dataset for split validation, from C:\Users\SB00790107\tensorflow_datasets\glue\sst2\0.0.2
I0824 10:26:23.292843 44212 tokenization_utils.py:306] Model name 'google/bert_uncased_L-2_H-128_A-2' not found in model shortcut name list (bert-base-uncased, bert-large-uncased, bert-base-cased, bert-large-cased, bert-base-multilingual-uncased, bert-base-multilingual-cased, bert-base-chinese, bert-base-german-cased, bert-large-uncased-whole-word-masking, bert-large-cased-whole-word-masking, bert-large-uncased-whole-word-masking-finetuned-squad, bert-large-cased-whole-word-masking-finetuned-squad, bert-base-cased-finetuned-mrpc, bert-base-german-dbmdz-cased, bert-base-german-dbmdz-uncased). Assuming 'google/bert_uncased_L-2_H-128_A-2' is a path or url to a directory containing tokenizer files.
I0824 10:26:23.293861 44212 tokenization_utils.py:317] Didn't find file google/bert_uncased_L-2_H-128_A-2. We won't load it.
I0824 10:26:23.294867 44212 tokenization_utils.py:335] Didn't find file google/bert_uncased_L-2_H-128_A-2\added_tokens.json. We won't load it.
I0824 10:26:23.294867 44212 tokenization_utils.py:335] Didn't find file google/bert_uncased_L-2_H-128_A-2\special_tokens_map.json. We won't load it.
I0824 10:26:23.294867 44212 tokenization_utils.py:335] Didn't find file google/bert_uncased_L-2_H-128_A-2\tokenizer_config.json. We won't load it.
Traceback (most recent call last):
File "C:\Users\SB00790107\AppData\Local\Continuum\anaconda3\envs\lit-nlp\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\SB00790107\AppData\Local\Continuum\anaconda3\envs\lit-nlp\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:~\lit\lit_nlp\examples\quickstart_sst_demo.py", line 60, in
app.run(main)
File "C:\Users\SB00790107\AppData\Local\Continuum\anaconda3\envs\lit-nlp\lib\site-packages\absl\app.py", line 299, in run
_run_main(main, args)
File "C:\Users\SB00790107\AppData\Local\Continuum\anaconda3\envs\lit-nlp\lib\site-packages\absl\app.py", line 250, in _run_main
sys.exit(main(argv))
File "C:~\lit\lit_nlp\examples\quickstart_sst_demo.py", line 48, in main
run_finetuning(model_path)
File "C:~\lit\lit_nlp\examples\quickstart_sst_demo.py", line 40, in run_finetuning
model = glue_models.SST2Model(FLAGS.encoder_name, for_training=True)
File "C:~\lit\lit_nlp\examples\models\glue_models.py", line 319, in init
**kw)
File "C:~\lit\lit_nlp\examples\models\glue_models.py", line 59, in init
model_name_or_path)
File "C:\Users\SB00790107\AppData\Local\Continuum\anaconda3\envs\lit-nlp\lib\site-packages\transformers\tokenization_auto.py", line 109, in from_pretrained
return BertTokenizer.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
File "C:\Users\SB00790107\AppData\Local\Continuum\anaconda3\envs\lit-nlp\lib\site-packages\transformers\tokenization_utils.py", line 282, in from_pretrained
return cls._from_pretrained(*inputs, **kwargs)
File "C:\Users\SB00790107\AppData\Local\Continuum\anaconda3\envs\lit-nlp\lib\site-packages\transformers\tokenization_utils.py", line 346, in _from_pretrained
list(cls.vocab_files_names.values())))
OSError: Model name 'google/bert_uncased_L-2_H-128_A-2' was not found in tokenizers model name list (bert-base-uncased, bert-large-uncased, bert-base-cased, bert-large-cased, bert-base-multilingual-uncased, bert-base-multilingual-cased, bert-base-chinese, bert-base-german-cased, bert-large-uncased-whole-word-masking, bert-large-cased-whole-word-masking, bert-large-uncased-whole-word-masking-finetuned-squad, bert-large-cased-whole-word-masking-finetuned-squad, bert-base-cased-finetuned-mrpc, bert-base-german-dbmdz-cased, bert-base-german-dbmdz-uncased). We assumed 'google/bert_uncased_L-2_H-128_A-2' was a path or url to a directory containing vocabulary files named ['vocab.txt'] but couldn't find such vocabulary files at this path or url.
(lit-nlp) C:~\lit>python -m lit_nlp.examples.pretrained_lm_demo --models=bert-base-uncased --port=5432
2020-08-24 10:27:30.452676: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
I0824 10:27:30.974245 20960 tokenization_utils.py:374] loading file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt from cache at C:\Users\SB00790107.cache\torch\transformers\26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084
I0824 10:27:31.431842 20960 configuration_utils.py:151] loading configuration file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-config.json from cache at C:\Users\SB00790107.cache\torch\transformers\4dad0251492946e18ac39290fcfe91b89d370fee250efe9521476438fe8ca185.7156163d5fdc189c3016baca0775ffce230789d7fa2a42ef516483e4ca884517
I0824 10:27:31.432831 20960 configuration_utils.py:168] Model config {
"architectures": [
"BertForMaskedLM"
],
"attention_probs_dropout_prob": 0.1,
"finetuning_task": null,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.1,
"hidden_size": 768,
"initializer_range": 0.02,
"intermediate_size": 3072,
"layer_norm_eps": 1e-12,
"max_position_embeddings": 512,
"model_type": "bert",
"num_attention_heads": 12,
"num_hidden_layers": 12,
"num_labels": 2,
"output_attentions": true,
"output_hidden_states": true,
"output_past": true,
"pad_token_id": 0,
"pruned_heads": {},
"torchscript": false,
"type_vocab_size": 2,
"use_bfloat16": false,
"vocab_size": 30522
}
I0824 10:27:31.845113 20960 modeling_tf_utils.py:258] loading weights file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-tf_model.h5 from cache at C:\Users\SB00790107.cache\torch\transformers\d667df51ec24c20190f01fb4c20a21debc4c4fc12f7e2f5441ac0a99690e3ee9.4733ec82e81d40e9cf5fd04556267d8958fb150e9339390fc64206b7e5a79c83.h5
W0824 10:27:33.815547 20960 dataset_builder.py:575] Found a different version 1.0.0 of dataset glue in data_dir C:\Users\SB00790107\tensorflow_datasets. Using currently defined version 0.0.2.
I0824 10:27:33.816513 20960 dataset_builder.py:184] Overwrite dataset info from restored data version.
I0824 10:27:33.819529 20960 dataset_builder.py:253] Reusing dataset glue (C:\Users\SB00790107\tensorflow_datasets\glue\sst2\0.0.2)
I0824 10:27:33.819529 20960 dataset_builder.py:399] Constructing tf.data.Dataset for split validation, from C:\Users\SB00790107\tensorflow_datasets\glue\sst2\0.0.2
I0824 10:27:34.212498 20960 dataset_builder.py:675] No config specified, defaulting to first: imdb_reviews/plain_text
I0824 10:27:34.214521 20960 dataset_builder.py:184] Overwrite dataset info from restored data version.
I0824 10:27:34.218503 20960 dataset_builder.py:253] Reusing dataset imdb_reviews (C:\Users\SB00790107\tensorflow_datasets\imdb_reviews\plain_text\0.1.0)
I0824 10:27:34.218503 20960 dataset_builder.py:399] Constructing tf.data.Dataset for split test, from C:\Users\SB00790107\tensorflow_datasets\imdb_reviews\plain_text\0.1.0
I0824 10:27:36.730678 20960 pretrained_lm_demo.py:92] Dataset: 'sst_dev' with 872 examples
I0824 10:27:36.731676 20960 pretrained_lm_demo.py:92] Dataset: 'imdb_train' with 25000 examples
I0824 10:27:36.732645 20960 pretrained_lm_demo.py:92] Dataset: 'blank' with 0 examples
I0824 10:27:36.732645 20960 dev_server.py:79]
( (
)\ ) )\ ) * )
(()/((()/(` ) /(
/())/())( )())
()) ()) ((())
| | | || |
| |_ | | | |
||| ||
I0824 10:27:36.732645 20960 dev_server.py:80] Starting LIT server...
I0824 10:27:36.733643 20960 caching.py:134] CachingModelWrapper 'bert-base-uncased': cache file /tmp/lit_data\bert-base-uncased.cache.pkl does not exist, not loading.
I0824 10:27:36.733643 20960 wsgi_serving.py:39]
Starting Server on port 5432
You can navigate to 127.0.0.1:5432
I0824 10:27:36.735637 20960 _internal.py:122] * Running on http://127.0.0.1:5432/ (Press CTRL+C to quit)
W0824 10:27:50.120238 20960 wsgi_app.py:57] IOError [Errno 2] No such file or directory: './lit_nlp/client/build/static/index.html' on path ./lit_nlp/client/build/static/index.html
I0824 10:27:50.120238 20960 wsgi_app.py:147] path ./lit_nlp/client/build/static/index.html not found, sending 404
I0824 10:27:50.121235 20960 _internal.py:122] 127.0.0.1 - - [24/Aug/2020 10:27:50] "�[33mGET / HTTP/1.1�[0m" 404 -
forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source
libifcoremd.dll 00007FFAE0F63B58 Unknown Unknown Unknown
KERNELBASE.dll 00007FFB399C5F63 Unknown Unknown Unknown
KERNEL32.DLL 00007FFB3B877BD4 Unknown Unknown Unknown
ntdll.dll 00007FFB3BC8CE51 Unknown Unknown Unknown
from lit.
Have you run the steps to build the front-end? Running the "yarn" and "yarn build" commands in the client directory? And did they succeed?
from lit.
My Yarn is running but didnt show any interface
(lit-nlp) C:~\lit>yarn && yarn build
yarn install v1.22.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.07s.
yarn run v1.22.4
error Couldn't find a package.json file in "C:\~\lit"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
from lit.
It looks like you're running from the root directory; can you try running yarn from lit_nlp/client
?
from lit.
Hello,
I have run python -m lit_nlp.examples.pretrained_lm_demo --models=bert-base-uncased --port=5432
and after navigated to UI, I realized an error message. And for that, I was able to check the following details at the console
I1207 23:10:53.014894 11092 caching.py:226] CachingModelWrapper 'bert-base-uncased': 1000 misses out of 1000 inputs
I1207 23:10:53.014894 11092 caching.py:231] Prepared 1000 inputs for model
E1207 23:10:53.021873 11092 wsgi_app.py:208] Uncaught error: _batch_encode_plus() got an unexpected keyword argument 'is_pretokenized'
Traceback (most recent call last):
File "D:\lit\lit-nlp\lib\site-packages\lit_nlp\lib\wsgi_app.py", line 191, in call
return self._ServeCustomHandler(request, clean_path)(environ,
File "D:\lit\lit-nlp\lib\site-packages\lit_nlp\lib\wsgi_app.py", line 176, in _ServeCustomHandler
return self._handlers[clean_path](self, request)
File "D:\lit\lit-nlp\lib\site-packages\lit_nlp\app.py", line 75, in _handler
outputs = fn(data, **kw)
File "D:\lit\lit-nlp\lib\site-packages\lit_nlp\app.py", line 239, in _get_interpretations
model_outputs = self._predict(data['inputs'], model, dataset_name)
File "D:\lit\lit-nlp\lib\site-packages\lit_nlp\app.py", line 138, in _predict
inputs, dataset_name=dataset_name)
File "D:\lit\lit-nlp\lib\site-packages\lit_nlp\lib\caching.py", line 203, in predict_with_metadata
results = self._predict_with_metadata(*args, **kw)
File "D:\lit\lit-nlp\lib\site-packages\lit_nlp\lib\caching.py", line 232, in _predict_with_metadata
model_preds = list(self._model.predict_with_metadata(model_inputs))
File "D:\lit\lit-nlp\lib\site-packages\lit_nlp\api\model.py", line 190, in
results = (scrub_numpy_refs(res) for res in results)
File "D:\lit\lit-nlp\lib\site-packages\lit_nlp\api\model.py", line 202, in _batched_predict
yield from self.predict_minibatch(minibatch, **kw)
File "D:\lit\lit-nlp\lib\site-packages\lit_nlp\examples\models\pretrained_lms.py", line 102, in predict_minibatch
pad_to_max_length=True)
File "D:\lit\lit-nlp\lib\site-packages\transformers\tokenization_utils_base.py", line 2519, in batch_encode_plus
**kwargs,
TypeError: _batch_encode_plus() got an unexpected keyword argument 'is_pretokenized'
from lit.
What version of transformers
do you have installed? The current LIT demos use transformers==2.11.0
(though we're in the process of updating them), which may have a different call signature to the tokenizers.
from lit.
What version of
transformers
do you have installed? The current LIT demos usetransformers==2.11.0
(though we're in the process of updating them), which may have a different call signature to the tokenizers.
yes, that is it. I just updated the transformers to 2.11.0 and it is done. Thanks.
from lit.
Related Issues (20)
- Would LiT support Object Detection Computer Vision models? HOT 1
- Defective pip dependencies: numba, numpy and protobuf HOT 3
- Most important words for false positives / false negatives
- Integration with TransformerLens ?
- LIT demo notebook not working HOT 8
- 404 no found with example test
- No widget displays when use LIT in SageMaker (Notebook Instance) HOT 10
- GSoC - Demos Project: Multi-Lingual Demo for the TyDi QA Task HOT 2
- GSoC - Tutorial Project: Feature Attribution
- GSoC - Demos Project: Text-to-Image Generation Demo
- Unknown error when running TCAV on a multiclass dataset HOT 3
- can't build the frontend HOT 3
- Keep one model in memory at any given time
- GSoC - Tutorial Project: Text Salience Maps
- Cuda memory errors when running pytorch example HOT 2
- GlueModel from example returns map object instead of list HOT 4
- Adding an entry in "Datapoint Editor" causes "Data Table" to jump to 1st page of results HOT 5
- Word clouds with LIT HOT 1
- odd error running on colab HOT 3
- Almost working Google Colab example HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lit.