MCPcopy Create free account
hub / github.com/ContextualAI/HALOs / __init__

Method __init__

train/utils.py:50–53  ·  view source on GitHub ↗
(self, file: TextIO)

Source from the content-addressed store, hash-verified

48class StreamingJSONWriter:
49 """Writes JSON arrays to a file in a streaming fashion."""
50 def __init__(self, file: TextIO):
51 self.file = file
52 self.is_first = True
53 self.file.write('[\n')
54
55 def write_item(self, item: Dict):
56 """Write a single item to the JSON array."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected