# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/07_import_utils.ipynb (unless otherwise specified).

__all__ = ['is_installed', 'INSTALLED_MODULES']

# Cell
import importlib

# Cell
def is_installed(module_name: str):
    return importlib.util.find_spec(module_name) is not None


_TF = "tensorflow"
_TF_GPU = "tensorflow-gpu"
_TORCH = "torch"
_TORCHVISION = "torchvision"
_JAX = "jax"
_FLAX = "flax"


INSTALLED_MODULES = {
    module: is_installed(module)
    for module in (_TF, _TF_GPU, _TORCH, _TORCHVISION, _JAX, _FLAX)
}