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

Function load

tensorflow_datasets/core/dataset_metadata.py:86–94  ·  view source on GitHub ↗

Returns dataset metadata loaded from files in pkg.

(pkg_path: epath.Path)

Source from the content-addressed store, hash-verified

84
85@functools.lru_cache(maxsize=256)
86def load(pkg_path: epath.Path) -> DatasetMetadata:
87 """Returns dataset metadata loaded from files in pkg."""
88 raw_metadata = _read_files(pkg_path)
89 tags = _get_tags(raw_metadata.get(TAGS_FILENAME, ""))
90 return DatasetMetadata(
91 description=raw_metadata.get(DESCRIPTIONS_FILENAME, None),
92 citation=raw_metadata.get(CITATIONS_FILENAME, None),
93 tags=tags,
94 )
95
96
97def _read_files(path: epath.Path) -> dict[str, str]:

Callers

nothing calls this directly

Calls 4

_get_tagsFunction · 0.85
DatasetMetadataClass · 0.85
getMethod · 0.80
_read_filesFunction · 0.70

Tested by

no test coverage detected