MCPcopy Create free account
hub / github.com/MoonshotAI/checkpoint-engine / check

Function check

tests/test_update.py:98–103  ·  view source on GitHub ↗
(names_to_check: dict[str, bool], weights: list[tuple[str, torch.Tensor]])

Source from the content-addressed store, hash-verified

96 memory_history: list[int] = [memory_usage]
97
98 def check(names_to_check: dict[str, bool], weights: list[tuple[str, torch.Tensor]]):
99 for name, weight in weights:
100 if name not in named_tensors:
101 continue
102 assert (weight == named_tensors[name]).all(), f"Tensor {name} does not match!"
103 names_to_check[name] = True
104
105 def check_weights(names_to_check: dict[str, bool], socket_paths: list[tuple[str, str]]):
106 socket_paths = dict(socket_paths)

Callers 1

check_weightsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected