shaltielshmid / TorchSharp.PyBridge

A library enabling easy transfer and handling of PyTorch models between .NET and Python environments
MIT License
14 stars 3 forks source link

SaveStateDict calls itself recursively and fails on locked file #16

Closed BalashovK closed 3 months ago

BalashovK commented 3 months ago

safetensors.cs line 50 SaveStateDict calls itself which causes 2nd attempt to open same output file. Perhaps, intention was to call method SaveStateDict from line 55 and pass the stream?

shaltielshmid commented 3 months ago

Great catch, Thanks! Fixing now, will be in the next release

shaltielshmid commented 3 months ago

Should be up in version 1.4.0 in the next few minutes.