Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The examples run only once, then they begin to generate error #1809

Closed
1 task done
kmkarakaya opened this issue Jul 17, 2022 · 10 comments · Fixed by #1850
Closed
1 task done

The examples run only once, then they begin to generate error #1809

kmkarakaya opened this issue Jul 17, 2022 · 10 comments · Fixed by #1850
Labels
bug Something isn't working

Comments

@kmkarakaya
Copy link

kmkarakaya commented Jul 17, 2022

Describe the bug

When I deploy an app on Spaces, the examples run only once, then if I click one of them they begin to generate error.

After building an app on spaces, each example run perfectly ONLY for ONCE. When I click any of them for the second or more times on the screen I only see ERROR message.

However, I can enter a new prompt manually and it works fine.

If I re-build the app, again the examples run only ONCE.

I checked the log but there seems no problem.

As far as I understood, there is a problem to fetch the cached example and its result.

Thank you in advanced

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

kmkarakaya/Auto_Review_Generation_in_Turkish

Screenshot

chrome_unlSniKJN9

Logs

2022-07-17 13:40:02.394081: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2022-07-17 13:40:02.394233: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2022-07-17 13:40:03.758419: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2022-07-17 13:40:03.758556: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2022-07-17 13:40:03.758695: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (s-kmkarakaya-auto--review--generation--in--turkish-ece09-bmmkbs): /proc/driver/nvidia/version does not exist
2022-07-17 13:40:03.759272: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

Downloading:   0%|          | 0.00/869 [00:00<?, ?B/s]
Downloading: 100%|██████████| 869/869 [00:00<00:00, 766kB/s]

Downloading:   0%|          | 0.00/480M [00:00<?, ?B/s]
Downloading:   2%|| 8.74M/480M [00:00<00:05, 91.6MB/s]
Downloading:   4%|| 17.5M/480M [00:00<00:05, 87.8MB/s]
Downloading:   5%|| 25.9M/480M [00:00<00:05, 85.4MB/s]
Downloading:   7%|| 34.6M/480M [00:00<00:05, 87.8MB/s]
Downloading:   9%|| 43.0M/480M [00:00<00:05, 87.0MB/s]
Downloading:  11%|| 51.5M/480M [00:00<00:05, 87.7MB/s]
Downloading:  13%|█▎        | 60.2M/480M [00:00<00:04, 88.8MB/s]
Downloading:  14%|█▍        | 69.4M/480M [00:00<00:04, 91.1MB/s]
Downloading:  16%|█▋        | 78.1M/480M [00:00<00:04, 90.8MB/s]
Downloading:  18%|█▊        | 86.7M/480M [00:01<00:05, 79.8MB/s]
Downloading:  20%|██        | 96.1M/480M [00:01<00:04, 85.0MB/s]
Downloading:  22%|██▏       | 105M/480M [00:01<00:04, 86.6MB/s] 
Downloading:  24%|██▎       | 114M/480M [00:01<00:04, 88.3MB/s]
Downloading:  25%|██▌       | 122M/480M [00:01<00:04, 87.8MB/s]
Downloading:  27%|██▋       | 131M/480M [00:01<00:04, 88.1MB/s]
Downloading:  29%|██▉       | 140M/480M [00:01<00:03, 90.6MB/s]
Downloading:  31%|███       | 148M/480M [00:01<00:03, 90.6MB/s]
Downloading:  33%|███▎      | 158M/480M [00:01<00:03, 91.8MB/s]
Downloading:  35%|███▍      | 167M/480M [00:01<00:03, 92.8MB/s]
Downloading:  37%|███▋      | 176M/480M [00:02<00:03, 94.0MB/s]
Downloading:  39%|███▊      | 185M/480M [00:02<00:03, 95.0MB/s]
Downloading:  40%|████      | 194M/480M [00:02<00:03, 95.7MB/s]
Downloading:  42%|████▏     | 204M/480M [00:02<00:03, 96.2MB/s]
Downloading:  44%|████▍     | 213M/480M [00:02<00:02, 96.6MB/s]
Downloading:  46%|████▋     | 222M/480M [00:02<00:02, 97.1MB/s]
Downloading:  48%|████▊     | 232M/480M [00:02<00:02, 97.6MB/s]
Downloading:  50%|█████     | 241M/480M [00:02<00:02, 97.8MB/s]
Downloading:  52%|█████▏    | 251M/480M [00:02<00:02, 98.1MB/s]
Downloading:  54%|█████▍    | 260M/480M [00:02<00:02, 98.5MB/s]
Downloading:  56%|█████▌    | 269M/480M [00:03<00:02, 98.5MB/s]
Downloading:  58%|█████▊    | 279M/480M [00:03<00:02, 98.4MB/s]
Downloading:  60%|██████    | 288M/480M [00:03<00:02, 98.3MB/s]
Downloading:  62%|██████▏   | 298M/480M [00:03<00:01, 98.3MB/s]
Downloading:  64%|██████▍   | 307M/480M [00:03<00:01, 98.1MB/s]
Downloading:  66%|██████▌   | 316M/480M [00:03<00:01, 98.1MB/s]
Downloading:  68%|██████▊   | 326M/480M [00:03<00:01, 98.1MB/s]
Downloading:  70%|██████▉   | 335M/480M [00:03<00:01, 98.2MB/s]
Downloading:  72%|███████▏  | 344M/480M [00:03<00:01, 98.2MB/s]
Downloading:  74%|███████▎  | 354M/480M [00:03<00:01, 97.6MB/s]
Downloading:  76%|███████▌  | 363M/480M [00:04<00:01, 97.3MB/s]
Downloading:  78%|███████▊  | 372M/480M [00:04<00:01, 97.0MB/s]
Downloading:  80%|███████▉  | 382M/480M [00:04<00:01, 97.2MB/s]
Downloading:  81%|████████▏ | 391M/480M [00:04<00:00, 97.3MB/s]
Downloading:  83%|████████▎ | 400M/480M [00:04<00:00, 97.7MB/s]
Downloading:  85%|████████▌ | 410M/480M [00:04<00:00, 97.8MB/s]
Downloading:  87%|████████▋ | 419M/480M [00:04<00:00, 98.1MB/s]
Downloading:  89%|████████▉ | 429M/480M [00:04<00:00, 98.2MB/s]
Downloading:  91%|█████████▏| 438M/480M [00:04<00:00, 98.3MB/s]
Downloading:  93%|█████████▎| 447M/480M [00:04<00:00, 97.7MB/s]
Downloading:  95%|█████████▌| 457M/480M [00:05<00:00, 97.8MB/s]
Downloading:  97%|█████████▋| 466M/480M [00:05<00:00, 97.9MB/s]
Downloading:  99%|█████████▉| 475M/480M [00:05<00:00, 98.1MB/s]
Downloading: 100%|██████████| 480M/480M [00:05<00:00, 94.6MB/s]
All model checkpoint layers were used when initializing TFGPT2LMHeadModel.

All the layers of TFGPT2LMHeadModel were initialized from the model checkpoint at kmkarakaya/turkishReviews-ds.
If your task is similar to the task the model of the checkpoint was trained on, you can already use TFGPT2LMHeadModel for predictions without further training.

Downloading:   0%|          | 0.00/772 [00:00<?, ?B/s]
Downloading: 100%|██████████| 772/772 [00:00<00:00, 812kB/s]

Downloading:   0%|          | 0.00/975k [00:00<?, ?B/s]
Downloading: 100%|██████████| 975k/975k [00:00<00:00, 80.7MB/s]

Downloading:   0%|          | 0.00/630k [00:00<?, ?B/s]
Downloading: 100%|██████████| 630k/630k [00:00<00:00, 78.3MB/s]

Downloading:   0%|          | 0.00/2.41M [00:00<?, ?B/s]
Downloading: 100%|██████████| 2.41M/2.41M [00:00<00:00, 86.4MB/s]

Downloading:   0%|          | 0.00/25.0 [00:00<?, ?B/s]
Downloading: 100%|██████████| 25.0/25.0 [00:00<00:00, 22.4kB/s]

Downloading:   0%|          | 0.00/470 [00:00<?, ?B/s]
Downloading: 100%|██████████| 470/470 [00:00<00:00, 428kB/s]
/home/user/.local/lib/python3.8/site-packages/gradio/deprecation.py:40: UserWarning: `enable_queue` is deprecated in `Interface()`, please use it within `launch()` instead.
  warnings.warn(value)
/home/user/.local/lib/python3.8/site-packages/gradio/interface.py:311: UserWarning: Currently, only the 'default' theme is supported.
  warnings.warn("Currently, only the 'default' theme is supported.")
Caching examples at: '/home/user/app/gradio_cached_examples/17/log.csv'
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Setting `pad_token_id` to 0 (first `eos_token_id`) to generate sequence
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Setting `pad_token_id` to 0 (first `eos_token_id`) to generate sequence
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Setting `pad_token_id` to 0 (first `eos_token_id`) to generate sequence
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Setting `pad_token_id` to 0 (first `eos_token_id`) to generate sequence
Running on local URL:  http://localhost:7860/

To create a public link, set `share=True` in `launch()`.
<IPython.core.display.HTML object>
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Setting `pad_token_id` to 0 (first `eos_token_id`) to generate sequence
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Setting `pad_token_id` to 0 (first `eos_token_id`) to generate sequence

System Info

I use the Spaces Gradio, 
Chrome Version 103.0.5060.114 (Official Build) (64-bit)

Severity

serious, but I can work around it

@kmkarakaya kmkarakaya added the bug Something isn't working label Jul 17, 2022
@abidlabs
Copy link
Member

Hi @kmkarakaya, I can't seem to reproduce the issue in your Space. Did you figure it out?

@kmkarakaya
Copy link
Author

Hi @abidlabs, NO. I just set cache_examples = False to avoid the issue. Now I removed the "cache_examples = False" parameter. If you re-try the examples few times you can experience the issue. Regards

@abidlabs
Copy link
Member

Hmm yes I see the issue, thanks we'll take a look at it.

@dhansmair
Copy link

I'm having the same issue with a huggingface space

@abidlabs
Copy link
Member

@dhansmair @kmkarakaya this should be fixed now! We'll release a new version of gradio shortly so you can update your Spaces. Thanks for bringing this to our attention.

@abidlabs
Copy link
Member

Should be fixed in gradio==3.1.1!

@kmkarakaya
Copy link
Author

Unfortunately, even I set up gradio==3.1.1 in the requirements.txt, the ERROR msg still appears.

@freddyaboulton
Copy link
Collaborator

Hi @kmkarakaya ! Can you post the logs? Might help us figure out what's happening.

@abidlabs
Copy link
Member

Ah I think I know the issue. Setting the version in requirements.txt doesn't work on Spaces. You have to set the sdk_version in the README. I've opened a PR in your repo to make the change: https://huggingface.co/spaces/kmkarakaya/Auto_Review_Generation_in_Turkish/discussions/2

@kmkarakaya
Copy link
Author

@abidlabs yes, this time it works smoothly. Thank you for your consideration and help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants