-
Notifications
You must be signed in to change notification settings - Fork 0
Serialization is broken. #174
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workinginterpreterRequires a code change in the interpreter.Requires a code change in the interpreter.patchRequires a patch version change.Requires a patch version change.
Milestone
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinginterpreterRequires a code change in the interpreter.Requires a code change in the interpreter.patchRequires a patch version change.Requires a patch version change.
According to the specification section 4.7.2:
In the implementation,
UNSERunconditionally forcesfinished = trueon all deserializedTHRvalues, causing paused threads to evaluate as falsey when they should be truthy. Additionally,SERencodes"stop"using thefinishedflag when it should reflect a separate "stop requested" state. This causes serialization and deserialization round-trips to lose thread lifecycle information.Separately,
UNSERaccepts malformed serialized forms without raising errors: missing"v"inBOOL, zero-dimensionTNSshapes, mismatched shape/data length inTNS, and tensor keys inMAPall silently succeed instead of raising runtime errors as the spec requires.