python/ray/_private/ray_option_utils.py
def _resource_option(name: str, default_value: Any = None):
    """This is used for non-negative options, typically for defining resources."""
    return Option(
        (float, int, type(None)),
        lambda x: x is None or x >= 0,
        f"The keyword '{name}' only accepts None, 0 or a positive number",
        default_value=default_value,
    )
This is used for non-negative options, typically for defining resources.
This is used for non-negative options, typically for defining resources.
This is used for non - negative options typically for defining resources .
def _resource_option(name: str, default_value: Any = None):
    return Option(
        (float, int, type(None)),
        lambda x: x is None or x >= 0,
        f"The keyword '{name}' only accepts None, 0 or a positive number",
        default_value=default_value,
    )
def _resource_option ( name : str , default_value : Any = None ) : return Option ( ( float , int , type ( None ) ) , lambda x : x is None or x >= 0 , f"The keyword '{name}' only accepts None, 0 or a positive number" , default_value = default_value , )
This is used for non-negative options, typically for defining resources.
This is used for non - negative options typically for defining resources .
"""This is used for non-negative options, typically for defining resources."""
name
str
default_value
Any