Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 5f016ff

Browse files
authored
Add special case in _get_tune_resources (#250)
* Adds special case in _get_tune_resources Signed-off-by: Antoni Baum <antoni.baum@protonmail.com> * Lint Signed-off-by: Antoni Baum <antoni.baum@protonmail.com> Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
1 parent d1bc1f8 commit 5f016ff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

xgboost_ray/tune.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ def _get_tune_resources(num_actors: int, cpus_per_actor: int,
122122
bundles = [head_bundle] + child_bundles
123123
placement_options = placement_options or {}
124124
placement_options.setdefault("strategy", "PACK")
125+
# Special case, same as in
126+
# ray.air.ScalingConfig.as_placement_group_factory
127+
# TODO remove after Ray 2.3 is out
128+
if placement_options.get("_max_cpu_fraction_per_node", None) is None:
129+
placement_options.pop("_max_cpu_fraction_per_node", None)
125130
placement_group_factory = PlacementGroupFactory(
126131
bundles, **placement_options)
127132

0 commit comments

Comments
 (0)