mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
No spaces in delimiters for serialized ML model
This commit is contained in:
parent
71f2a3f793
commit
38251ddf08
@ -34,7 +34,9 @@ class ModelSerializer(ABC):
|
||||
return self._feature_names
|
||||
|
||||
def serialize_and_compress_model(self) -> str:
|
||||
json_string = json.dumps({"trained_model": self.to_dict()})
|
||||
json_string = json.dumps(
|
||||
{"trained_model": self.to_dict()}, separators=(",", ":")
|
||||
)
|
||||
return base64.b64encode(gzip.compress(bytes(json_string, "utf-8")))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user