python/ray/_private/ray_option_utils.py
def validate_actor_options(options: Dict[str, Any], in_options: bool):
    """Options check for Ray actors.

    Args:
        options: Options for Ray actors.
        in_options: If True, we are checking the options under the context of
            ".options()".
    """
    for k, v in options.items():
        if k not in actor_options:
            raise ValueError(
                f"Invalid option keyword {k} for actors. "
                f"Valid ones are {list(actor_options)}."
            )
        actor_options[k].validate(k, v)

    if in_options and "concurrency_groups" in options:
        raise ValueError(
            "Setting 'concurrency_groups' is not supported in '.options()'."
        )

    if options.get("max_restarts", 0) == 0 and options.get("max_task_retries", 0) != 0:
        raise ValueError(
            "'max_task_retries' cannot be set if 'max_restarts' "
            "is 0 or if 'max_restarts' is not set."
        )

    if options.get("get_if_exists") and not options.get("name"):
        raise ValueError("The actor name must be specified to use `get_if_exists`.")
    _check_deprecate_placement_group(options)
Options check for Ray actors.

    Args:
        options: Options for Ray actors.
        in_options: If True, we are checking the options under the context of
            ".options()".
    
Options check for Ray actors.
Options check for Ray actors .
def validate_actor_options(options: Dict[str, Any], in_options: bool):
    for k, v in options.items():
        if k not in actor_options:
            raise ValueError(
                f"Invalid option keyword {k} for actors. "
                f"Valid ones are {list(actor_options)}."
            )
        actor_options[k].validate(k, v)
    if in_options and "concurrency_groups" in options:
        raise ValueError(
            "Setting 'concurrency_groups' is not supported in '.options()'."
        )
    if options.get("max_restarts", 0) == 0 and options.get("max_task_retries", 0) != 0:
        raise ValueError(
            "'max_task_retries' cannot be set if 'max_restarts' "
            "is 0 or if 'max_restarts' is not set."
        )
    if options.get("get_if_exists") and not options.get("name"):
        raise ValueError("The actor name must be specified to use `get_if_exists`.")
    _check_deprecate_placement_group(options)
def validate_actor_options ( options : Dict [ str , Any ] , in_options : bool ) : for k , v in options . items ( ) : if k not in actor_options : raise ValueError ( f"Invalid option keyword {k} for actors. " f"Valid ones are {list(actor_options)}." ) actor_options [ k ] . validate ( k , v ) if in_options and "concurrency_groups" in options : raise ValueError ( "Setting 'concurrency_groups' is not supported in '.options()'." ) if options . get ( "max_restarts" , 0 ) == 0 and options . get ( "max_task_retries" , 0 ) != 0 : raise ValueError ( "'max_task_retries' cannot be set if 'max_restarts' " "is 0 or if 'max_restarts' is not set." ) if options . get ( "get_if_exists" ) and not options . get ( "name" ) : raise ValueError ( "The actor name must be specified to use `get_if_exists`." ) _check_deprecate_placement_group ( options )
Options check for Ray actors.
Options check for Ray actors .
"""Options check for Ray actors.

    Args:
        options: Options for Ray actors.
        in_options: If True, we are checking the options under the context of
            ".options()".
    """
options
Dict[str, Any]
Options for Ray actors.
Options for Ray actors .
in_options
bool
If True, we are checking the options under the context of
".options()".
If True we are checking the options under the context of " . options () " .