haochengxia / vscode-pydata-viewer

Display PyData files (.npz .npy .pkl .pth) in VSCode.
https://marketplace.visualstudio.com/items?itemName=Percy.vscode-pydata-viewer
MIT License
14 stars 8 forks source link

Use CPU to load torch files #23

Closed blaisewf closed 4 months ago

blaisewf commented 4 months ago

This may fix some bugs since without an env like conda, torch usually does not install correctly.

Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.

haochengxia commented 4 months ago

Thanks for your PR! 👏

blaisewf commented 4 months ago

You're welcome, great extension! It would be great if you could update it in the VS Code markeplace.

haochengxia commented 4 months ago

A new version of the extension will be released this week. Thank you again for your encouragement and support.

haochengxia commented 4 months ago

New version 0.0.13 has been released on the VS Code marketplace with this update. 🥳