MCPcopy Index your code
hub / github.com/tensorflow/datasets / add_example

Method add_example

tensorflow_datasets/core/sequential_writer.py:59–63  ·  view source on GitHub ↗

Writes a new example.

(self, serialized_example: str)

Source from the content-addressed store, hash-verified

57 num_bytes: int = 0
58
59 def add_example(self, serialized_example: str) -> None:
60 """Writes a new example."""
61 self.writer.write(serialized_example)
62 self.num_examples += 1
63 self.num_bytes += len(serialized_example)
64
65 def close_writer(self) -> None:
66 """Closes the writer."""

Callers 2

add_exampleMethod · 0.45
add_examplesMethod · 0.45

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected