this is expected. it’s how python works.
If you have a file torch.py in your current directory, it’ll take precedence for import.
You can debug these issues by printing which torch got imported.
>>> import torch
>>> print(torch)