(self, start_step: int, end_step: int)
| 495 | await self.save_checkpoint() |
| 496 | |
| 497 | async def _finish_steps(self, start_step: int, end_step: int) -> None: |
| 498 | for step in range(start_step, end_step + 1): |
| 499 | self.logger.info(f"Waiting for step {step}") |
| 500 | await self._finish_explore_step(step=step) |
| 501 | await self._finish_eval_step(step=step) |
| 502 | |
| 503 | # Record the time: read_task + explore_step (>=1) + eval (if any) |
| 504 | if self.explore_start_time is not None: |
| 505 | metric = {"explore/time/sync_interval": time.time() - self.explore_start_time} |
| 506 | self.explore_start_time = None |
| 507 | if self.monitor is not None: |
| 508 | self.monitor.log(metric, step=end_step) |
| 509 | |
| 510 | async def _finish_explore_step(self, step: int) -> None: |
| 511 | if self.rollout_coordinator is None: |
no test coverage detected