(key, state_dict)
| 39 | return new_state_dict |
| 40 | |
| 41 | def remap_key(key, state_dict): |
| 42 | for k in self.split_keys: |
| 43 | if k in key: |
| 44 | return key.split(k)[0] + k |
| 45 | |
| 46 | raise ValueError( |
| 47 | f"There seems to be a problem with the state_dict: {set(state_dict.keys())}. {key} has to have one of {self.split_keys}." |
| 48 | ) |
| 49 | |
| 50 | def map_from(module, state_dict, *args, **kwargs): |
| 51 | all_keys = list(state_dict.keys()) |
nothing calls this directly
no outgoing calls
no test coverage detected