R
RunPod11mo ago
Hello

Safetensor safeopen OS Error device not found

Running inference on severless endpoint and this line of code:
with safetensors.safe_open(path, framework="pt", device="cpu") as f:
with safetensors.safe_open(path, framework="pt", device="cpu") as f:
Throws OSError: No such device (os error 19) Running on RTX5000. Attached a network volume. The path used in the safe_open leads to a safetensor file in /runpod-volume/example.safetensor Anyone got this error before?
9 Replies
ashleyk
ashleyk11mo ago
Are you using network storage?
Hello
HelloOP11mo ago
Yes I am! I have attached it to the runpod serverless instance under the advanced settings as well.
ashleyk
ashleyk11mo ago
Sounds like it could be an issue with unstable network storage:
I've seen that happen when using network mounted disks.

If the network is flaky then the read might fail even though the rest went fine. Error should be transient though.
Could that be it ?
I've seen that happen when using network mounted disks.

If the network is flaky then the read might fail even though the rest went fine. Error should be transient though.
Could that be it ?
Hello
HelloOP11mo ago
I see. To be honest, I have restarted it multiple time and even managed to print out the contents of the network mounted disk. I guess I could try it without a network disk and update this post accordingly.
ashleyk
ashleyk11mo ago
Yeah worth a shot to try and figure out where its going wrong.
Hello
HelloOP11mo ago
Just tried, same error haha.
ashleyk
ashleyk11mo ago
What is the path to the file you are trying to open?
Hello
HelloOP11mo ago
I am trying to open /runpod-volume/example.safetensor. Note that I didn't rename runpod-volume to something else since I assume runpod-volume is just a folder with or without a network disk mounted.
ashleyk
ashleyk11mo ago
Does the folder exist without a network volume though? Your network volume gets mounted there automatically by serverless if you attach a network volume to your endpoint, but it doesn't exist without a network volume unless you create it.
Want results from more Discord servers?
Add your server