MCPcopy Create free account
hub / github.com/tensorflow/datasets / _get_index_path

Function _get_index_path

tensorflow_datasets/core/writer.py:100–113  ·  view source on GitHub ↗

Returns path to the index file of the records stored at the given path. E.g: Say the path to a shard of records (of a particular split) are stored at `your/path/to/records/foo.riegeli-00001-of-00005`, it is transformed into `your/path/to/records/foo.riegeli-00001-of-00005_index.json`. Args

(path: str)

Source from the content-addressed store, hash-verified

98
99
100def _get_index_path(path: str) -> epath.PathLike:
101 """Returns path to the index file of the records stored at the given path.
102
103 E.g: Say the path to a shard of records (of a particular split) are stored at
104 `your/path/to/records/foo.riegeli-00001-of-00005`, it is transformed into
105 `your/path/to/records/foo.riegeli-00001-of-00005_index.json`.
106
107 Args:
108 path: Path to the record file.
109
110 Returns:
111 Path of the index file of a shard of records stored at given path.
112 """
113 return path + _INDEX_PATH_SUFFIX
114
115
116def _get_shard_specs(

Callers 2

_get_shard_specsFunction · 0.85
_write_final_shardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected