spaGO v0.4.0 Release Notes
Release Date: 2021-01-17 // over 3 years ago-
โ Added
- โ Various new test cases (improving the coverage).
- ๐ฆ
nlp.embeddings.syncmap
package. ml.nn.recurrent.srnn.BiModel
which implements a bidirectional variant of the Shuffling Recurrent Neural Networks ( SRNN).- ๐ Configurable timeout and request limit to all HTTP and gRPC servers (see also commands help).
๐ Changed
- ๐จ All CLI commands implementation has been refactored, so that the
docker-entrypoint
can reuse all othercli.App
objects, instead of just running separate executables. By extension, now the Dockerfile builds a single executable file, and the final image is way smaller. - โฌ๏ธ All dependencies have been upgraded to the latest version.
- Simplify custom error definitions using
fmt.Errorf
instead of functions fromgithub.com/pkg/errors
. - Custom binary data serialization of matrices and models is now achieved
with Go's
encoding.gob
. Many specific functions and methods are now replaced by fewer and simpler encoding/decoding methods compatible withgob
. A list of important related changes follows.utils.kvdb.KeyValueDB
is no longer an interface, but a struct which directly implements the former "badger backend".utils.SerializeToFile
andutils.DeserializeFromFile
now handle genericinterface{}
objects, instead of values implementingSerializer
andDeserializer
.mat32
andmat64
custom serialization functions (e.g.MarshalBinarySlice
,MarshalBinaryTo
, ...) are replaced by implementations ofBinaryMarshaler
andBinaryUnmarshaler
interfaces onDense
andSparse
matrix types.PositionalEncoder.Cache
andAxialPositionalEncoder.Cache
fields (fromml.encoding.pe
package) are now public.- All types implementing
nn.Model
interface are registered for gob serialization (in init functions). embeddings.Model.UsedEmbeddings
type is nownlp.embeddings.syncmap.Map
.- As a consequence, you will have to re-serialize all your models.
- Flair converter now sets the vocabulary directly in the model, instead of creating a separate file.
sequencelabeler.Model.LoadParams
has been renamed toLoad
.
โ Removed
- In relation to the aforementioned gob serialization changes:
nn.ParamSerializer
and related functionsnn.ParamsSerializer
and related functionsutils.Serializer
andutils.Deserializer
interfacesutils.ReadFull
function
sequencelabeler.Model.LoadVocabulary
๐ Fixed
- ๐ณ
docker-entrypoint
sub-commandhugging-face-importer
has been renamed tohuggingface-importer
, just like the main command itself. - ๐ณ
docker-entrypoint
sub-command can be correctly specified without leading./
or/
when run from a Docker container. - ๐ฅ BREAKING: mat32.Matrix serialization has been fixed, now serializing single values to chunks of 4 bytes (instead of 8, like float64). Serialized 32-bit models will now be half the size! Unfortunately you will have to re-serialize your models (sorry!).