Module Not Found Error: No module named 'torch._C'

RuntimeError: Failed to import transformers.models.t5.modeling_t5 because of the following error (look up to see its traceback): Module Not Found Error: No module named ‘torch._C’

Hi @Selena

Welcome to the community.

Are you trying to run locally?

I am just trying to follow the lab work steps exactly as it’s shown in the video. And it does not work - model does not load producing the error I pasted above.

Looks like the packages wasn’t imported properly.

Restart the kernel and try again, please.

Already did… the step with downloading packages produced errors - exactly the same errors as shown in the video for this course (according to the video, we should just ignore these errors). The next two steps ran fine, and then the model did not load.

1 Like

I tried again - it’s not working, producing the same error.

So sorry to ask, but, are you using what platform to run the lab?

I am using exactly what’s shown in the video for the course: AWS sagemaker… is that your question?

Yes, thank you.

I found a issue on the pytorch repository. Not sure if is the case here.

I just want to clarify - I am using the lab environment provided by Coursera (For this course). I am simply following exactly the steps outlined in the video for this course. I didn’t code any of that - the step which is failing was part of the code provided with the lab. So, I can’t even start this lab because of this error.

1 Like

I understand. My intention here is to troubleshooting the error in order to fix it since there is no report in the all community regard this error.

So, looks like it is something on your envirioment that we have to find out.

The course platform create a instance for you. So, it is a separate envirioment. That’s why i m calling “your envirioment”

Another approach we can follow is to report to the Coursera platform:

Best regards

I cannot proceed with the course if it does not work.

Hi @Selena

The community is to help the learners with their questions and share some knowledge.

This is a place made for learners to learners.

For payment or refund issues, you have to contact directly the Coursera platform.

Best regards

Yes, I am here to solve an issue because the lab is not working properly, and I cannot load the model and start the lab. Are you saying it cannot be fixed? In this case, I’d ask for reimbursement, but first I am trying to find a solution here…

So sorry. I really wanna help you, but we have to do some troubleshooting steps in order to find the real cause of this. It could be something temporary with the amazon envirioment, for example. To understand the cause of this issue we have to collaborate together with patience and politely. But a feeling that you have no intention to collaborate at all.

Best regards

I am not sure I understand this conclusion. I am here because I need to fix this issue and would be happy to take any troubleshooting steps. I believe I even followed everything you suggested. If there are any other troubleshooting - please let me know.

The reason why a shared a pytorch repository issue with you is to understand if the issue that you facing is the same issue that other learners or pytorch users facing as well.

My intention is to eliminate a probable cause to this issue, as I do not have access to the lab or the Amazon platform.

Maybe the ideal now would be to wait for another mentor to help us or report the problem to the coursera platform.

Best regards