(names_to_check: dict[str, bool], weights: list[tuple[str, torch.Tensor]])
| 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) |