Sync the model weights
(
self,
model_version: int,
method: SyncMethod,
timeout: float = 1200,
)
| 841 | await self.model.set_state_dict_meta.remote(state_dict_meta) |
| 842 | |
| 843 | async def sync_model_weights( |
| 844 | self, |
| 845 | model_version: int, |
| 846 | method: SyncMethod, |
| 847 | timeout: float = 1200, |
| 848 | ) -> None: |
| 849 | """Sync the model weights""" |
| 850 | await self.model.sync_model_weights.remote(model_version, method, timeout=timeout) |
| 851 | if self._engine_type == "tinker": |
| 852 | # update the model path after syncing weights for tinker engine |
| 853 | self._model_path = await self.model.get_model_path.remote() |
| 854 | |
| 855 | def extract_experience_from_history(self, clear_history: bool = True) -> List[Experience]: |
| 856 | """Extract experiences from the history.""" |
no test coverage detected