Skip to content

Commit

Permalink
[tune] Fix memory resources for head bundle (#23861)
Browse files Browse the repository at this point in the history
Fixes memory and object_store_memory actor options not being set properly for the Tune trainable.
  • Loading branch information
Yard1 authored Apr 12, 2022
1 parent 71e142b commit ff60ebd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/ray/tune/utils/placement_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,8 @@ def get_full_actor_cls(
head_bundle = pg.bundle_specs[0].copy()
num_cpus = head_bundle.pop("CPU", 0)
num_gpus = head_bundle.pop("GPU", 0)
memory = head_bundle.pop("memory", None)
object_store_memory = head_bundle.pop("object_store_memory", None)

# Only custom resources remain in `head_bundle`
resources = head_bundle
Expand All @@ -517,6 +519,8 @@ def get_full_actor_cls(
placement_group_capture_child_tasks=True,
num_cpus=num_cpus,
num_gpus=num_gpus,
memory=memory,
object_store_memory=object_store_memory,
resources=resources,
)
else:
Expand Down

0 comments on commit ff60ebd

Please sign in to comment.