Utils
Utility functions for the integrations module.
get_integration_for_module(module_name)
Gets the integration class for a module inside an integration.
If the module given by module_name
is not part of a ZenML integration,
this method will return None
. If it is part of a ZenML integration,
it will return the integration class found inside the integration
init file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module_name
|
str
|
The name of the module to get the integration for. |
required |
Returns:
Type | Description |
---|---|
Optional[Type[Integration]]
|
The integration class for the module. |
Source code in src/zenml/integrations/utils.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
get_requirements_for_module(module_name)
Gets requirements for a module inside an integration.
If the module given by module_name
is not part of a ZenML integration,
this method will return an empty list. If it is part of a ZenML integration,
it will return the list of requirements specified inside the integration
class found inside the integration init file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module_name
|
str
|
The name of the module to get requirements for. |
required |
Returns:
Type | Description |
---|---|
List[str]
|
A list of requirements for the module. |
Source code in src/zenml/integrations/utils.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|