-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[data] Remove ray.kill in ActorPoolMapOperator #47752
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -640,13 +640,15 @@ def _kill_all_running_actors(self): | |
|
||
def _kill_running_actor(self, actor: ray.actor.ActorHandle): | ||
"""Kill the provided actor and remove it from the pool.""" | ||
ray.kill(actor) | ||
del self._num_tasks_in_flight[actor] | ||
del self._actor_locations[actor] | ||
assert actor not in self._pending_actors | ||
|
||
def _kill_pending_actor(self, ready_ref: ray.ObjectRef): | ||
"""Kill the provided pending actor and remove it from the pool.""" | ||
actor = self._pending_actors.pop(ready_ref) | ||
ray.kill(actor) | ||
assert actor not in self._num_tasks_in_flight | ||
assert actor not in self._actor_locations | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why we're asserting after modified the state? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the assert is for a different dict. |
||
|
||
def _get_location(self, bundle: RefBundle) -> Optional[NodeIdStr]: | ||
"""Ask Ray for the node id of the given bundle. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a note that we intend to refactor this with the pause API at some point?