INNER CODE UNIT · Python

get_config

datawhalechina/fun-rec · src/funrec/config/__init__.py:99

def get_config(model_name: str) -> Dict[str, Any]:
    """
    根据模型名称获取配置字典
    
    Args:
        model_name: 模型名称 (如 "fm", "afm")
    
    Returns:
        配置字典
    
    Raises:
        KeyError: 如果模型配置不存在
    """
    if model_name not in CONFIG_MAPPING:
        available_models = ", ".join(sorted(CONFIG_MAPPING.keys()))
        raise KeyError(f"模型 \"{model_name}\" 的配置不存在。可用模型: {available_models}")
    
    return CONFIG_MAPPING[model_name]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…