mlflow/database/__init__.py
def _validate_deployment_flavor(model_config):
    """
    Checks that the model flavor is a supported deployment flavor and returns the flavor.
    If not, an exception is thrown.
    :param model_config: An MLflow Model object
    """
    for flavor in model_config.flavors:
        if flavor in SUPPORTED_DEPLOYMENT_FLAVORS:
            return flavor
    raise MlflowException(
        message=(
            "The model flavors: `{flavors}` are not supported for deployment."
            " Please use one of the supported flavors: {supported_flavor_names}".format(
                flavors=model_config.flavors,
                supported_flavor_names=SUPPORTED_DEPLOYMENT_FLAVORS)),
        error_code=INVALID_PARAMETER_VALUE)

    Checks that the model flavor is a supported deployment flavor and returns the flavor.
    If not, an exception is thrown.
    :param model_config: An MLflow Model object
    
Checks that the model flavor is a supported deployment flavor and returns the flavor.
If not, an exception is thrown.
Checks that the model flavor is a supported deployment flavor and returns the flavor . If not an exception is thrown .
def _validate_deployment_flavor(model_config):
    for flavor in model_config.flavors:
        if flavor in SUPPORTED_DEPLOYMENT_FLAVORS:
            return flavor
    raise MlflowException(
        message=(
            "The model flavors: `{flavors}` are not supported for deployment."
            " Please use one of the supported flavors: {supported_flavor_names}".format(
                flavors=model_config.flavors,
                supported_flavor_names=SUPPORTED_DEPLOYMENT_FLAVORS)),
        error_code=INVALID_PARAMETER_VALUE)
def _validate_deployment_flavor ( model_config ) : for flavor in model_config . flavors : if flavor in SUPPORTED_DEPLOYMENT_FLAVORS : return flavor raise MlflowException ( message = ( "The model flavors: `{flavors}` are not supported for deployment." " Please use one of the supported flavors: {supported_flavor_names}" . format ( flavors = model_config . flavors , supported_flavor_names = SUPPORTED_DEPLOYMENT_FLAVORS ) ) , error_code = INVALID_PARAMETER_VALUE )
Checks that the model flavor is a supported deployment flavor and returns the flavor.
Checks that the model flavor is a supported deployment flavor and returns the flavor .
"""
    Checks that the model flavor is a supported deployment flavor and returns the flavor.
    If not, an exception is thrown.
    :param model_config: An MLflow Model object
    """
model_config
An MLflow Model object
An MLflow Model object