SuperAI_Forecast / backend /forecasting /runtime_availability.py
Thang6822's picture
Upload folder using huggingface_hub
7d63c70 verified
from __future__ import annotations
from typing import Optional
def format_runtime_unavailable_detail(
*,
label: str,
fallback: str,
import_error: Optional[str] = None,
) -> str:
normalized_error = str(import_error or "").strip()
if normalized_error:
return f"{label} is unavailable: {normalized_error}"
return fallback