evalml.utils.import_or_raise¶
-
evalml.utils.
import_or_raise
(library, error_msg=None, warning=False)[source]¶ Attempts to import the requested library by name. If the import fails, raises an ImportError or warning.
- Parameters
library (str) – the name of the library
error_msg (str) – error message to return if the import fails
warning (bool) – if True, import_or_raise gives a warning instead of ImportError. Defaults to False.