from typing import Dict
from typing import Any
import importlib


def get_grid_search_params(grid_search_params_path: str) -> Dict[str, Any]:
    """Get grid_search_params from python file.

    Args:
        grid_search_params_path (str): Python file with grid_search_params.

    Returns:
        Dict[str, Any]: grid_search_params.
    """

    spec = importlib.util.spec_from_file_location(  # type: ignore
        name="hyperparams",
        location=grid_search_params_path,
    )
    hyperparams = importlib.util.module_from_spec(spec)  # type: ignore
    spec.loader.exec_module(hyperparams)  # type: ignore

    grid_search_params = hyperparams.grid_search_params  # type: ignore

    return grid_search_params