from typing import Mapping
from typing import Any
from typing import Dict


def logs_as_floats(logs: Mapping[str, Any]) -> Dict[str, float]:
    """Convert Keras metric log values to floats."""
    return {name: float(value) for name, value in logs.items()}