Skip to content

Commit

Permalink
Add special case in _get_tune_resources (#250)
Browse files Browse the repository at this point in the history
* Adds special case in _get_tune_resources

Signed-off-by: Antoni Baum <[email protected]>

* Lint

Signed-off-by: Antoni Baum <[email protected]>

Signed-off-by: Antoni Baum <[email protected]>
  • Loading branch information
Yard1 authored Dec 12, 2022
1 parent d1bc1f8 commit 5f016ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xgboost_ray/tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ def _get_tune_resources(num_actors: int, cpus_per_actor: int,
bundles = [head_bundle] + child_bundles
placement_options = placement_options or {}
placement_options.setdefault("strategy", "PACK")
# Special case, same as in
# ray.air.ScalingConfig.as_placement_group_factory
# TODO remove after Ray 2.3 is out
if placement_options.get("_max_cpu_fraction_per_node", None) is None:
placement_options.pop("_max_cpu_fraction_per_node", None)
placement_group_factory = PlacementGroupFactory(
bundles, **placement_options)

Expand Down

0 comments on commit 5f016ff

Please sign in to comment.