MCPcopy Create free account
hub / github.com/AI-Hypercomputer/maxtext / get_tpu_dependencies

Function get_tpu_dependencies

build_hooks.py:23–32  ·  view source on GitHub ↗

Reads the TPU requirements file and returns a list of dependencies.

()

Source from the content-addressed store, hash-verified

21
22
23def get_tpu_dependencies():
24 """Reads the TPU requirements file and returns a list of dependencies."""
25 if not os.path.exists(TPU_REQUIREMENTS_PATH):
26 print(f"Warning: TPU requirements file not found at {TPU_REQUIREMENTS_PATH}. Skipping dependency injection.")
27 return []
28
29 with open(TPU_REQUIREMENTS_PATH, "r") as f: # pylint: disable=unspecified-encoding
30 # Filter out comments and empty lines
31 deps = [line.strip() for line in f if line.strip() and not line.strip().startswith("#")]
32 return deps
33
34
35class CustomBuildHook(BuildHookInterface):

Callers 1

initializeMethod · 0.85

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected