MCPcopy Create free account
hub / github.com/OpenBMB/MiniCPM-V / write

Method write

omnilmm/utils.py:74–86  ·  view source on GitHub ↗
(self, buf)

Source from the content-addressed store, hash-verified

72 return getattr(self.terminal, attr)
73
74 def write(self, buf):
75 temp_linebuf = self.linebuf + buf
76 self.linebuf = ''
77 for line in temp_linebuf.splitlines(True):
78 # From the io.TextIOWrapper docs:
79 # On output, if newline is None, any '\n' characters written
80 # are translated to the system default line separator.
81 # By default sys.stdout.write() expects '\n' newlines and then
82 # translates them so this is still cross platform.
83 if line[-1] == '\n':
84 self.logger.log(self.log_level, line.rstrip())
85 else:
86 self.linebuf += line
87
88 def flush(self):
89 if self.linebuf != '':

Callers 15

unwrap_hf_pklFunction · 0.80
unzip_hf_zipMethod · 0.80
prepare_tsvMethod · 0.80
concat_tar_partsMethod · 0.80
unwrap_hf_pklFunction · 0.80
unzip_hf_zipFunction · 0.80
summary_multi_expFunction · 0.80
dump_jsonlFunction · 0.80
mwlinesFunction · 0.80
mainFunction · 0.80
resample_audioMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected