Error in jupyter

I get this problem:
{‘error’: ‘CUDA error: device-side assert triggered\nCUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.\nFor debugging consider passing CUDA_LAUNCH_BLOCKING=1.’}

In the 3rd cell when involking get_completion(text):

1 Like

Hi @smt1

Welcome to the community.

if your code runs normally on CPU device, try deleting the current runtime and restart it.

Best regards

I have the same error running the code in the environment online (so not locally) : https://learn.deeplearning.ai/huggingface-gradio/lesson/2/nlp-tasks-interface
Restarting kernel does not help, besides I get ‘Forbidden’
image

Oh, I’m sorry!

I wasn’t that clear in my last reply.

Some machine learning libraries provide a option to run your code using CPU or GPU possessing.

Witch one are you using?

The error persist when you switch between then?

Thanks!

We are running with the deeplearning.ai interface in the course. There is something wrong with the setup - I do not think you can chose CPU or GPU:

1 Like

@elirod I think there are other problems too in the following cells:

Well, i found a workaround

try to add this code by the end of the cell and run it

get_completion(text)
os.environ['CUDA_LAUNCH_BLOCKING'] = "1" #  <--- Add this line

Regards this 502 bad gateway issue, i was able to workaround it by restarts and clear the kernel a few times

Thanks @elirod

So nothing is working 502 all the time after restarts, etc… even restarted and upgraded the chrome browser.

1 Like

That’s odd. It worked out for me.

I’m running out of ideas.

Just to be clear, you are restarting and cleaning out the Kernel, right?

The good news it is the developer team are aware of this issue and working on it to fixed as soon as possible.

Please, accept my sincere apologies regarding this issue. I count on your understanding and patience.

best regards
elirod

1 Like

Thanks @elirod, I tried this but it didn’t work. The cell doesn’t output anything after adding this line

1 Like

Same error here!

Hi @phi.designer

Welcome to the community.

I think that is an expected behavior. This cell is not supposed to return a output. It load a string and assign to a variable

Best regards
elirod

Thanks @elirod !
Well, it seems the guys sorted out at the backend, 'cause it’s working now! :slight_smile:

Just for clarity: The cell is expected to output the summary of the “text” variable. Is the output of the get_completion function i.e. return json.loads(response.content.decode(“utf-8”))

1 Like

Oh, i got it.

I did’t notice that about get_completion function. Thank you!

I will fix my comment.

Hi @elirod any news from the dev team on this bug? Thanks!

Hi @phi.designer

Yep!

I do a quick test and everything is fine now Regards the CUDA error on get_completion() function.

Regards the 504 bad gateway error, i restarted the kernel & clear all the outputs again and it works fine.

Note that there is no need to restart the kernel multiple times, but, it should be necessary to run the cell code more then once to finally make it work.

I tried to run a cell code one, but in the second one it’s work perfectly.

To be honest, i don’t quite sure if the gateway error is an issue in our side. Mainly because is work with a couple cell code run tries.

Best regards

I’m not able to get Gradio running. I tried on a windows 11 pc on different browsers and also booted the PC with an Ubuntu thumbdrive. same error…

Hi @Alan_Landever

So sorry that your experiencing that issue.

I tried again just right now and the 504 gateway error occurs. But a tried to run the code cell again and it works fine.

Would you mind to send me your notebook so i can review it and tried to find something that is leading to this issue?

To do that, click on my avatar en hit the message button.

I will review as soon as i can.

Keep in mind that it could take a while.

Thank you for your patience.

Hi,

If the problem is on my side, please let me know what I need to do. I will rebuild the os. What is the best setup?

Thanks,

Alan