All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Improved performance further with a few memory pools at hotspots.
- Better handling of escaped strings.
- Lots of performance enhancements. This is roughly 4x faster and uses 1/8th the number of memory allocations than 0.2.2 does (and about 1/3 the memory).
- API now takes []byte as argument, not io.Reader. This slice must not be mutated until operations (like calling JSON method) on the returned types.Object are completed.
- Python tuples become JSON lists.
- Added types.None, which was missing.
- Make every python object implement types.Object, and types.Object has a JSON() method which emits the equivalent JSON. This necessitated wrapping all the types which were bare Go, like bool, int, string, into named types. In the end, I don't emit JSON directly. I still construct the intermediate python objects, and then ask them to emit. This creates lots of garbage to gc, so I might re-explore directly emitted the JSON as as unpickle.
- forked from nlpodyssey/gopickle (or really, a child of that, nsd20463/gopickle b/c I wanted the improvements there)
- More and better documentation
OrderedDict.MustGet()Dict.MustGet()pytorch.LoadWithUnpickler()which allows loading PyTorch modules using a custom unpickler.- Handle legacy method
torch.nn.backends.thnn._get_thnn_function_backendwhen loading pytorch modules.
FrozenSetimplementation was modified, avoiding confusion withSet.- Replace build CI job with tests and coverage
Dicthas been reimplemented using a slice, instead of a map, because in Go not all types can be map's keys (e.g. slices).- Use Go version
1.15
- Unused method
List.Extend
- Modify GitHub Action steps
BuildandTestincluding all sub-packages.
- Initial implementation of
typespackage - Initial implementation of
picklepackage - Initial implementation of
pytorchpackage