Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,12 @@ async def _poll_workers(self) -> WorkerGroupPollStatus:
self._health_check_interval_s - time_since_last_poll, 0
)
await asyncio.sleep(remaining_time)
if self.get_state().is_terminal():
logger.debug(
f"Controller is unexpectedly in terminal state {self.get_state()} after "
"sleeping and before polling workers. Exiting actor."
)
ray.actor.exit_actor()

status = self._worker_group.poll_status(timeout=self._health_check_interval_s)
self._latest_poll_time = time_monotonic()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ def _log_decision(
logger.info(
f"[FailurePolicy] {decision.value}\n"
f" Source: {error_source}\n"
f" Error count: {error_count} (max allowed: {retry_limit})\n\n"
f"{training_failed_error}"
f" Error count: {error_count} (max allowed: {retry_limit})\n\n",
exc_info=(
type(training_failed_error),
training_failed_error,
training_failed_error.__traceback__,
),
)

def _is_retryable_error(self, training_failed_error: TrainingFailedError) -> bool:
Expand Down
1 change: 1 addition & 0 deletions python/ray/train/v2/api/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def __init__(self, controller_failure: Exception):
"Training failed due to controller error:\n" + str(controller_failure)
)
self.controller_failure = controller_failure
self.with_traceback(controller_failure.__traceback__)

def __reduce__(self):
return (self.__class__, (self.controller_failure,))