From a897a34d7d989bf317de17f80948639c0fd5ecf1 Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Tue, 7 Feb 2023 11:00:15 +0100 Subject: [PATCH] DOC fix missing info and formatting for get_engine_classes --- sklearn/_engine/base.py | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/sklearn/_engine/base.py b/sklearn/_engine/base.py index 953b3602a6f98..c9382d5573941 100644 --- a/sklearn/_engine/base.py +++ b/sklearn/_engine/base.py @@ -108,12 +108,26 @@ def get_engine_classes(engine_name, default, verbose=False): match the name of enabled engine providers, as well as, ad-hoc providers in the form of engine classes in the list of enabled engine providers. - Returns - ------- - For each matching provider the "name" and the engine class - is yielded. The "name" corresponds to the entry in the - `engine_provider` configuration. It can be a string or - a class for ad-hoc providers. + Parameters + ---------- + engine_name : str + The name of the algorithm for which to find engine classes. + + default : class + The default engine class to use if no other provider is found. + + verbose : bool, default=False + If True, print the name of the engine classes that are tried. + + Yields + ------ + provider : str or class + The "name" of each matching provider. The "name" corresponds to the + entry in the `engine_provider` configuration. It can be a string or a + class for programmatically registered ad-hoc providers. + + engine_class : + The engine class that implements the algorithm for the given provider. """ provider_names = get_config()["engine_provider"]