load_mlflow_gateway_config#
- scikitplot.llm_provider.load_mlflow_gateway_config(path)[source]#
Load MLflow Gateway model configuration from a YAML file.
Parses a configuration file defining multiple model endpoints. Supports environment variable expansion and validates expected structure.
- Parameters:
- pathstr
Path to the MLflow Gateway YAML file. May contain
~
or environment variables.
- Returns:
- dict of str to list of dict
A dictionary where each key is a provider name and each value is a list of dictionaries with keys: - ‘model_id’: str - ‘api_key’: str (may be empty if not resolved)
- Raises:
- ScikitplotException
If the YAML is malformed, missing fields, or the file doesn’t exist.
- Parameters:
path (str)
- Return type:
Notes
API keys can be hardcoded or passed via environment variables using
$VARNAME
or${VARNAME}
.This loader is tolerant to partial failures but logs all issues.
Examples
>>> cfg = load_mlflow_gateway_config("~/gateway.yaml") >>> cfg["openai"][0]["model_id"] 'gpt-4'