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

Function exists

tensorflow_datasets/core/utils/gcs_utils.py:73–78  ·  view source on GitHub ↗

Checks if path exists. Returns False if issues occur connecting to GCS.

(path: epath.Path)

Source from the content-addressed store, hash-verified

71
72
73def exists(path: epath.Path) -> bool:
74 """Checks if path exists. Returns False if issues occur connecting to GCS."""
75 try:
76 return path.exists()
77 except gcs_unavailable_exceptions(): # pylint: disable=catching-non-exception
78 return False
79
80
81@py_utils.memoize()

Callers 3

gcs_listdirFunction · 0.85
gcs_dataset_info_pathFunction · 0.85
is_dataset_on_gcsFunction · 0.85

Calls 2

existsMethod · 0.80

Tested by

no test coverage detected