Skip to content

reset_config

sklearn_wrap.config.reset_config()

Restore the sklearn-wrap configuration to its defaults for the current thread.

Examples

>>> set_config(trusted_modules=frozenset({"my_pkg"}))
>>> reset_config()
>>> get_config()["trusted_modules"] == DEFAULT_TRUSTED_MODULES
True

See Also

set_config : Persistently update the configuration. get_config : Retrieve the current configuration.

Source Code

Show/Hide source
def reset_config() -> None:
    """Restore the sklearn-wrap configuration to its defaults for the current thread.

    Examples
    --------
    >>> set_config(trusted_modules=frozenset({"my_pkg"}))
    >>> reset_config()
    >>> get_config()["trusted_modules"] == DEFAULT_TRUSTED_MODULES
    True

    See Also
    --------
    set_config : Persistently update the configuration.
    get_config : Retrieve the current configuration.
    """
    _threadlocal.config = {}