MCPcopy
hub / github.com/ruc-datalab/DeepAnalyze / append

Method append

deepanalyze/ms-swift/swift/utils/io_utils.py:85–92  ·  view source on GitHub ↗
(self, obj: Union[Dict, List[Dict]], gather_obj: bool = False)

Source from the content-addressed store, hash-verified

83 self._write_buffer("".join(obj_list))
84
85 def append(self, obj: Union[Dict, List[Dict]], gather_obj: bool = False):
86 if self.enable_async:
87 if self._thread is None:
88 self._thread = Thread(target=self._append_worker, daemon=True)
89 self._thread.start()
90 self._queue.put({"obj": obj, "gather_obj": gather_obj})
91 else:
92 self._append(obj, gather_obj=gather_obj)
93
94 def _write_buffer(self, text: str):
95 if not text:

Callers 15

test_model_archFunction · 0.95
append_to_jsonlFunction · 0.95
generateMethod · 0.45
create_messageMethod · 0.45
prepare_vllm_messagesFunction · 0.45
diff_and_collectMethod · 0.45
render_file_blockFunction · 0.45

Calls 3

_appendMethod · 0.95
putMethod · 0.80
startMethod · 0.45

Tested by 15

test_model_archFunction · 0.76
_startMethod · 0.36
_test_clientFunction · 0.36
test_jsonlMethod · 0.36
test_template_compareMethod · 0.36
test_loss_matchingMethod · 0.36
test_llmFunction · 0.36
_infer_audioFunction · 0.36
_infer_imageFunction · 0.36
_infer_videoFunction · 0.36
_infer_imageFunction · 0.36
test_llmFunction · 0.36