functions
get_extension_by_flow(flow, raise_if_no_extension=False)
¶
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.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
flow
|
OpenMLFlow
|
|
required |
raise_if_no_extension
|
bool (optional
|
Raise an exception if no registered extension can handle the presented flow. |
False)
|
Returns:
Type | Description |
---|---|
Extension or None
|
|
Source code in openml/extensions/functions.py
get_extension_by_model(model, raise_if_no_extension=False)
¶
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.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
Any
|
|
required |
raise_if_no_extension
|
bool (optional
|
Raise an exception if no registered extension can handle the presented model. |
False)
|
Returns:
Type | Description |
---|---|
Extension or None
|
|
Source code in openml/extensions/functions.py
register_extension(extension)
¶
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
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
extension
|
Type[Extension]
|
|
required |
Returns:
Type | Description |
---|---|
None
|
|