MCPcopy
hub / github.com/modelscope/ms-swift / _processor

Method _processor

swift/dataset/packing.py:145–154  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

143 self.workers.append(worker)
144
145 def _processor(self):
146 while True:
147 i, data = self._in_queue.get()
148 encoded_data = {}
149 try:
150 encoded_data = self.template.encode(data, return_length=True)
151 except Exception as e:
152 if self.strict and not isinstance(e, MaxLengthError):
153 raise
154 self._out_queue.put((i, encoded_data))
155
156 def _put_data_in_queue(self, iterator) -> int:
157 for i in range(self.packing_interval):

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.80
putMethod · 0.80

Tested by

no test coverage detected