Closed rwikdutta closed 4 years ago
Hi rwikdutta, It seems like all the requests in your case have been loaded from the cache of a previous run:
I0822 15:19:40.357330 140224925210432 caching.py:137] CachingModelWrapper 'sst': loading from /tmp/lit_data/sst.cache.pkl
I0822 15:19:40.424300 140224925210432 caching.py:96] Loaded cache (884 entries) from /tmp/lit_data/sst.cache.pkl
and
I0822 15:20:43.701397 140224925210432 caching.py:213] CachingModelWrapper 'sst': 0 misses out of 872 inputs
I0822 15:20:43.701481 140224925210432 caching.py:218] Prepared 0 inputs for model
I0822 15:20:43.701582 140224925210432 caching.py:220] Received 0 predictions from model
It could be that the cache contains outputs from the previous model and the first time you call the new model is when you add a new datapoint. I think what is happening is that the cached UMAP embedding dimension (128) does not match the new model's embedding dimension (2?). This may happen if you gave the new model the same name as the previous model here: https://github.com/PAIR-code/lit/blob/main/lit_nlp/examples/quickstart_sst_demo.py#L51 ("sst" for both) . Could you please clear "/tmp/lit_data" directory and run again only with the new model?
Thanks for the clarification.
Hi, I modified the quickstart_sst_demo.py example file to allow it to run already fine-tuned models from huggingface without the need to first train it. I had loaded this model https://huggingface.co/sshleifer/tiny-distilbert-base-uncased-finetuned-sst-2-english into the tool and was using it. It was working fine, until I entered a custom sentence in Datapoint Editor ( i.e. not in the loaded validation set ) and clicked on Make New Datapoint and got the following error:
E0822 15:21:16.088476 140224925210432 wsgi_app.py:210] Uncaught error: Incompatible dimension for X and Y matrices: X.shape[1] == 2 while Y.shape[1] == 128
I had earlier tried this model also https://huggingface.co/textattack/bert-base-uncased-SST-2 and that too gave the same error.
I went back and checked the same thing when using the default script ( where google/bert_uncased_L-2_H-128_A-2 is first loaded, fine tuned for 3 epochs and then this model is used in LIT ), this issue didn't take place.
Logs while loading the distilbert model:
Error Log ( Traceback ):
Kindly help.
Thanks