-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
dsharp.save/load with BinaryFormatter is blocked on .NET Interactive
Issue #440 | Created by @nhirschey | 2022-10-11 21:42:05 UTC |
Related to PR #430, .NET Interactive blocks BinaryFormatter, so this prevents model saving and loading in F# notebooks.
TorchSharp seems to be using BinaryWriter to get around this (e.g. here)
This is in VSCode using .ipynb notebook
#r "nuget: DiffSharp-lite"
open DiffSharp
dsharp.save(dsharp.tensor([1..10]), "test.params")cell output:
Error: System.NotSupportedException: BinaryFormatter serialization and deserialization are disabled within this application. See https://aka.ms/binaryformatter for more information.
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
at DiffSharp.Util.UtilAutoOpens.saveBinary[T](T object, String fileName)
at DiffSharp.Tensor.save(String fileName)
at <StartupCode$FSI_0006>.$FSI_0006.main@()Metadata
Metadata
Assignees
Labels
No labels