Message error about torch

2025-01-18 20:19:50.425 Examining the path of torch.classes raised: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_
2025-01-18 20:22:47.243 Examining the path of torch.classes raised: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_
2025-01-18 20:27:47.313 Examining the path of torch.classes raised: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_
1 Like

same problem

"2025-01-21 05:53:23.909 Examining the path of torch.classes raised: Tried to instantiate class 'path.path’, but it does not exist! Ensure that it is registered via torch::class
2025-01-21 05:53:27.653 Examining the path of torch.classes raised: Tried to instantiate class 'path.path’, but it does not exist! Ensure that it is registered via torch::class
"

No work multiple instance witch external conexion

same problem. However, app works fine locally, but breaks when deployed as docker image

I have the same issue.

Just in case if any one has figured out a solution?

Examining the path of torch.classes raised: Tried to instantiate class 'path .path’, but it does not exist! Ensure that it is registered via torch::class

I was Facing the same issue but after some research this solution worked for me:

import torch
import pandas as pd
import matplotlib.pyplot as plt
import requests
import streamlit as st
# Import required libraries

torch.classes.__path__ = [] # add this line to manually set it to empty. 

But most of the time this is not recommended.

5 Likes

I am also seeing this issue. Any one figure out a correct solution? is it a versioning issue?

Same problem for me.

1 Like

Thank you! It worked for me