MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / encode_list

Method encode_list

lm_inference.py:96–101  ·  view source on GitHub ↗
(self, inputs_strs: list[str])

Source from the content-addressed store, hash-verified

94 return self.vocab.encode(inputs_str)
95
96 def encode_list(self, inputs_strs: list[str]) -> list[int]:
97 result = [self.vocab.encode(x) for x in inputs_strs]
98 assert all([len(x) == 1 for x in result]), [
99 self.decode(x) for x in result if len(x) != 1
100 ]
101 return [x[0] for x in result]
102
103 def call(
104 self,

Callers 2

__init__Method · 0.95
beam_decodeMethod · 0.95

Calls 2

decodeMethod · 0.95
encodeMethod · 0.80

Tested by

no test coverage detected