Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using smbclient to load PyTorch model weights from a server, but I encountered some issues. #37

Open
QingshuiL opened this issue Nov 6, 2023 · 0 comments

Comments

@QingshuiL
Copy link

QingshuiL commented Nov 6, 2023

I tried using smbclient to load PyTorch model weights from a server, but I encountered some issues.

file_path = r"\\x.x.x.x\home\pytorch-models\resnet18-f37072fd.pth"
with smbclient.open_file(file_path, mode='rb', buffering=0) as fd:
    data = torch.load(fd, map_location=torch.device('cpu'))

The error

Exception has occurred: RuntimeError
PytorchStreamReader failed reading file data/140219036705280: file read failed

Is there any way I can load model weights?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant