MCPcopy Index your code
hub / github.com/tensorflow/tensorboard / get_default_assets_zip_provider

Function get_default_assets_zip_provider

tensorboard/assets.py:24–36  ·  view source on GitHub ↗

Try to get a function to provide frontend assets. Returns: Either (a) a callable that takes no arguments and returns an open file handle to a Zip archive of frontend assets, or (b) `None`, if the frontend assets cannot be found.

()

Source from the content-addressed store, hash-verified

22
23
24def get_default_assets_zip_provider():
25 """Try to get a function to provide frontend assets.
26
27 Returns:
28 Either (a) a callable that takes no arguments and returns an open
29 file handle to a Zip archive of frontend assets, or (b) `None`, if
30 the frontend assets cannot be found.
31 """
32 path = os.path.join(os.path.dirname(__file__), "webfiles.zip")
33 if not os.path.exists(path):
34 logger.warning("webfiles.zip static assets not found: %s", path)
35 return None
36 return lambda: open(path, "rb")

Callers

nothing calls this directly

Calls 2

joinMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…