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

Method append

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

Source from the content-addressed store, hash-verified

73 self._write_buffer(''.join(obj_list))
74
75 def append(self, obj: Union[Dict, List[Dict]], gather_obj: bool = False):
76 if self.enable_async:
77 if self._thread is None:
78 self._thread = Thread(target=self._append_worker, daemon=True)
79 self._thread.start()
80 self._queue.put({'obj': obj, 'gather_obj': gather_obj})
81 else:
82 self._append(obj, gather_obj=gather_obj)
83
84 def _write_buffer(self, text: str):
85 if not text:

Callers 15

test_model_archFunction · 0.95
append_to_jsonlFunction · 0.95
gen_packages_itemsFunction · 0.80
write_dataset_infoFunction · 0.80
get_model_info_tableFunction · 0.80
runMethod · 0.80
prepare_experimentsMethod · 0.80
beginMethod · 0.80
find_all_configFunction · 0.80
generate_sft_reportFunction · 0.80
generate_export_reportFunction · 0.80
generate_reportsFunction · 0.80

Calls 3

_appendMethod · 0.95
startMethod · 0.80
putMethod · 0.80

Tested by 15

test_model_archFunction · 0.76
_startMethod · 0.64
_test_clientFunction · 0.64
__call__Method · 0.64
test_jsonlMethod · 0.64
test_loss_matchingMethod · 0.64
test_registrationMethod · 0.64
test_llmFunction · 0.64
_infer_audioFunction · 0.64
_infer_imageFunction · 0.64
_infer_videoFunction · 0.64
_infer_imageFunction · 0.64