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

Function load_named_sharding_json

tests/sharding_dump.py:251–255  ·  view source on GitHub ↗

Loads the named_shardings.json file into a plain Python dict.

(json_path: str | Path)

Source from the content-addressed store, hash-verified

249
250
251def load_named_sharding_json(json_path: str | Path) -> dict:
252 """Loads the named_shardings.json file into a plain Python dict."""
253 json_path = Path(json_path)
254 with open(json_path, "r", encoding="utf-8") as f:
255 return json.load(f)
256
257
258def main(argv: Sequence[str]) -> None:

Callers 2

mainFunction · 0.85

Calls

no outgoing calls

Tested by 1