Skip to content

Commit

Permalink
Use UTF+2581 instead of '|' as the separator for serializing a list t…
Browse files Browse the repository at this point in the history
…o str

PiperOrigin-RevId: 581392085
Change-Id: I88477ce2ce67fc00067b6e9540cc7a3ec5d91c43
  • Loading branch information
ashishenoyp authored and copybara-github committed Nov 10, 2023
1 parent 0160e13 commit 78954e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions saxml/server/model_service_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1336,11 +1336,11 @@ def _generate_rng_seed(self):
def _encode_message(self, *msgs: str) -> str:
assert msgs
for m in msgs:
assert '\u2581' not in m
return '\u2581'.join(msgs)
assert '|' not in m
return '|'.join(msgs)

def _decode_message(self, encoded: str) -> List[str]:
return encoded.split('\u2581')
return encoded.split('|')

def _load_model(
self,
Expand Down

0 comments on commit 78954e5

Please sign in to comment.