(self, state_dict)
| 145 | } |
| 146 | |
| 147 | def load_state_dict(self, state_dict): |
| 148 | self.states = state_dict['states'] |
| 149 | self.buffer = state_dict['buffer'].clone() |
| 150 | self.tokens = deepcopy(state_dict['tokens']) |
| 151 | self.rand_id = state_dict['rand_id'] |
| 152 | self.token_id = state_dict['token_id'] |
| 153 | self.rng_state = state_dict['rng_state'].clone() if state_dict['rng_state'] is not None else None |
| 154 | self._epoch = state_dict['epoch'] |
| 155 | |
| 156 | |
| 157 | @dataclass |
no outgoing calls
no test coverage detected