python/ray/_private/ray_option_utils.py
def _check_deprecate_placement_group(options: Dict[str, Any]):
    """Check if deprecated placement group option exists."""
    placement_group = options.get("placement_group", "default")
    scheduling_strategy = options.get("scheduling_strategy")
    # TODO(suquark): @ray.remote(placement_group=None) is used in
    # "python/ray/data/impl/remote_fn.py" and many other places,
    # while "ray.data.read_api.read_datasource" set "scheduling_strategy=SPREAD".
    # This might be a bug, but it is also ok to allow them co-exist.
    if (placement_group not in ("default", None)) and (scheduling_strategy is not None):
        raise ValueError(
            "Placement groups should be specified via the "
            "scheduling_strategy option. "
            "The placement_group option is deprecated."
        )
Check if deprecated placement group option exists.
Check if deprecated placement group option exists.
Check if deprecated placement group option exists .
def _check_deprecate_placement_group(options: Dict[str, Any]):
    placement_group = options.get("placement_group", "default")
    scheduling_strategy = options.get("scheduling_strategy")
    if (placement_group not in ("default", None)) and (scheduling_strategy is not None):
        raise ValueError(
            "Placement groups should be specified via the "
            "scheduling_strategy option. "
            "The placement_group option is deprecated."
        )
def _check_deprecate_placement_group ( options : Dict [ str , Any ] ) : placement_group = options . get ( "placement_group" , "default" ) scheduling_strategy = options . get ( "scheduling_strategy" ) if ( placement_group not in ( "default" , None ) ) and ( scheduling_strategy is not None ) : raise ValueError ( "Placement groups should be specified via the " "scheduling_strategy option. " "The placement_group option is deprecated." )
Check if deprecated placement group option exists.
Check if deprecated placement group option exists .
"""Check if deprecated placement group option exists.""" # TODO(suquark): @ray.remote(placement_group=None) is used in # "python/ray/data/impl/remote_fn.py" and many other places, # while "ray.data.read_api.read_datasource" set "scheduling_strategy=SPREAD". # This might be a bug, but it is also ok to allow them co-exist.
options
Dict[str, Any]