Why can i import "import_class"

import argparse
import sys
import torchlight
from torchlight import import_class

Traceback (most recent call last):
File “/Users/josujin/Downloads/AS-GCN-master/main.py”, line 4, in
from torchlight import import_class
ImportError: cannot import name ‘import_class’ from ‘torchlight’ (/Users/josujin/anaconda3/lib/python3.7/site-packages/torchlight/init.py)

how can i import import_class from torchlight?

my environment :
anaconda3
python3.7.6

Hi @Sujin_Jo
Can you try this steps out: link

Let me know if this worked for you.

First, Thanks for ur reply.

That problem has been solved,
but I have new problem.

Traceback (most recent call last):
File “/Users/josujin/AS-GCN/main.py”, line 14, in
processors[‘demo’] = import_class(‘processor.demo.Demo’)
File “/Users/josujin/AS-GCN/torchlight/io.py”, line 186, in import_class
__ import__(mod_str)
ModuleNotFoundError: No module named 'processor.demo’

So, I did commented out this line,
processors[‘demo’] = import_class(‘processor.demo.Demo’)

Can I do this?

Yes. That should solve your issue.
Let me know if it worked as expected.