functions
openml.extensions.functions
#
get_extension_by_flow
#
get_extension_by_flow(flow: OpenMLFlow, raise_if_no_extension: bool = False) -> Extension | None
Get an extension which can handle the given flow.
Iterates all registered extensions and checks whether they can handle the presented flow. Raises an exception if two extensions can handle a flow.
| PARAMETER | DESCRIPTION |
|---|---|
flow
|
TYPE:
|
raise_if_no_extension
|
Raise an exception if no registered extension can handle the presented flow.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Extension or None
|
|
Source code in openml/extensions/functions.py
get_extension_by_model
#
get_extension_by_model(model: Any, raise_if_no_extension: bool = False) -> Extension | None
Get an extension which can handle the given flow.
Iterates all registered extensions and checks whether they can handle the presented model. Raises an exception if two extensions can handle a model.
| PARAMETER | DESCRIPTION |
|---|---|
model
|
TYPE:
|
raise_if_no_extension
|
Raise an exception if no registered extension can handle the presented model.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Extension or None
|
|
Source code in openml/extensions/functions.py
register_extension
#
register_extension(extension: type[Extension]) -> None
Register an extension.
Registered extensions are considered by get_extension_by_flow and
get_extension_by_model, which are used by openml.flow and openml.runs.
| PARAMETER | DESCRIPTION |
|---|---|
extension
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
None
|
|