Skip to content

Commit

Permalink
[ci/multinode] Fix resource popping resulting in empty resource head …
Browse files Browse the repository at this point in the history
…nodes (ray-project#21531)

Fixes a small bug where we pop from the resources dict without making a copy, emptying the head node resources. This sometimes leads to empty head node resources.
  • Loading branch information
krfricke authored Jan 11, 2022
1 parent d2d749b commit 084bda8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ def set_node_tags(self, node_id, tags):
raise AssertionError("Readonly node provider cannot be updated")

def create_node_with_resources(self, node_config, tags, count, resources):
resources = resources.copy()

with self.lock:
node_type = tags[TAG_RAY_USER_NODE_TYPE]
next_id = self._next_hex_node_id()
Expand Down

0 comments on commit 084bda8

Please sign in to comment.