def _validate_config_args(config: Optional[Dict[str, Union[str, int, float, bytes]]]) -> None:
    """Validator for the configuration.

    Parameters
    ----------
    config
        configuration arguments passed into ``__init__`` of
        ``ModelComponent``

    Raises
    ------
    TypeError
        If ``config`` is not a dict.
    TypeError
        If ``config`` is a dict with invalid key/values
    ValueError
        If ``config`` is a dict with 0 arguments

    """
    if config is None:
        return

    if not isinstance(config, dict):
        raise TypeError(f"Config must be {dict}. Recieved config={config}")

    if len(config) == 0:
        raise ValueError("cannot set dict of length < 1 for `config`")

    for k, v in config.items():
        if not isinstance(k, str):
            raise TypeError(f"config key={k} != {str} type")
        if not isinstance(v, (str, bytes, int, float)):
            raise TypeError(f"config val k={k}, v={v} != {(str, bytes, int, float)} type")
Validator for the configuration.

    Parameters
    ----------
    config
        configuration arguments passed into ``__init__`` of
        ``ModelComponent``

    Raises
    ------
    TypeError
        If ``config`` is not a dict.
    TypeError
        If ``config`` is a dict with invalid key/values
    ValueError
        If ``config`` is a dict with 0 arguments

    
src/flash/core/serve/component.py