Skip to content

Commit

Permalink
Fix index error when FCWSR
Browse files Browse the repository at this point in the history
  • Loading branch information
s5u13b committed Nov 7, 2024
1 parent 4acb199 commit 1b4224c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions llumnix/llm_engine_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,15 @@ async def migrate_done_callback(ret, migrate_instance_pair: Tuple[str, str]) ->
self.instance_migrating[migrate_instance_pair[0]] = False
if migrate_instance_pair[1] in self.instance_migrating:
self.instance_migrating[migrate_instance_pair[1]] = False
if isinstance(ret, (ray.exceptions.RayActorError, KeyError)):
# TODO(s5u13b): Add more exception types for failover.
if isinstance(ret, (ray.exceptions.RayActorError, ray.exceptions.RayTaskError, KeyError)):
has_error_pair = await self._check_instance_error(migrate_instance_pair)
for i, has_error in enumerate(has_error_pair):
# Instance without error should clear migration states.
if not has_error:
try:
await self.instances[migrate_instance_pair[i]].clear_migration_states.remote(is_migrate_in=bool(i))
except (ray.exceptions.RayActorError, KeyError):
except (ray.exceptions.RayActorError, ray.exceptions.RayTaskError, KeyError):
has_error = True
for i, has_error in enumerate(has_error_pair):
if has_error:
Expand Down
3 changes: 2 additions & 1 deletion llumnix/llumlet/local_migration_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,6 @@ def _get_first_waiting_request(self, min_request_len, max_request_len) -> List[L
def _get_first_waiting_and_shortest_running_requests(self, min_request_len, max_request_len) -> List[LlumnixRequest]:
waiting_requests = self._get_first_waiting_request(min_request_len, max_request_len)
running_requests = self._get_shortest_running_request(min_request_len, max_request_len)
waiting_requests[0].eom = True
if waiting_requests:
waiting_requests[0].eom = True
return waiting_requests + running_requests

0 comments on commit 1b4224c

Please sign in to comment.