def get_resolved_io_config(
        io_config: Union[dict[str, Any], IoConfig],
        force_kv_cache: bool = False,
        model_attributes: Optional[dict[str, Any]] = None,
    ) -> dict[str, Any]:
        """Resolve io_config to a dictionary.

        :param io_config: io_config to resolve.
        :param force_kv_cache: whether to enable kv_cache if not already enabled.
        """
        io_config_obj = validate_config(io_config, IoConfig)

        # enable kv_cache
        io_config_obj.kv_cache = io_config_obj.kv_cache or force_kv_cache

        if io_config_obj.kv_cache:
            kv_cache_config = complete_kv_cache_with_model_attributes(io_config_obj.kv_cache, model_attributes or {})
            io_config_obj = extend_io_config_with_kv_cache(io_config_obj, kv_cache_config)
        return io_config_obj.dict(exclude_none=True)
Resolve io_config to a dictionary.

        :param io_config: io_config to resolve.
        :param force_kv_cache: whether to enable kv_cache if not already enabled.
        
olive/model/handler/pytorch.py