MCPcopy Create free account
hub / github.com/InternScience/SciReason / flush

Method flush

opencompass/models/base_api.py:77–87  ·  view source on GitHub ↗

Ensure simultaneous emptying of stdout and stderr when concurrent resources are available. When employing multiprocessing with standard I/O redirected to files, it is crucial to clear internal data for examination or prevent log loss in case of system failures."

(self)

Source from the content-addressed store, hash-verified

75 'instead.')
76
77 def flush(self):
78 """Ensure simultaneous emptying of stdout and stderr when concurrent
79 resources are available.
80
81 When employing multiprocessing with standard I/O redirected to files,
82 it is crucial to clear internal data for examination or prevent log
83 loss in case of system failures."
84 """
85 if hasattr(self, 'tokens'):
86 sys.stdout.flush()
87 sys.stderr.flush()
88
89 def acquire(self):
90 """Acquire concurrent resources if exists.

Callers 15

_run_within_retryMethod · 0.80
write_jsonl_linesFunction · 0.80
scoreMethod · 0.80
write_jsonl_linesFunction · 0.80
scoreMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80
generateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected