Install PythonSDK Extensions
To leverage PythonSDK Extensions in AI Hub (Job Agent, Web API Agent, Scoring Agent) required steps depend on how you
manage Python environments. Though, either way, you need to ensure
to install the extension Python Extension Loader
(PEL) by placing it into AI Hub's main synchronization folder such
that it gets synchronized to all AI Hub components. Make sure to restart AI Hub afterwards. In addition, place any
Python SDK extension into AI Hub's home directory under resources/python-sdk-extensions
. Wait
for synchronization of resources or restart your Job Agents and/or Web API Agents to pick up the
changes. Your Python SDK extensions will be ready to use.
PythonSDK Extensions require Python environments. The Python Extension Loader ensures that required Python environments are installed in each component (Job Agent, Web API Agent) where PythonSDK extensions are found.
Though, in the default AI Hub setup (kubernetes or docker deployment) Python environments are managed centrally
through Platform Admin. Individual components are not
allowed to install additional Python environments on-the-fly. Instead, ensure that the Python Extension Loader is
configured to pick them up from the central place by setting PYSDK_PEL_DIST_LOC=/opt/coding-shared/envs
for each Job
Agent/Web API Agent. Furthermore, you need to install the required Python environment for each PythonSDK extension *
*manually** inside the Platform Admin by extracting the
env.yaml
file from the PythonSDK extension's zip file and pasting it in the web interface.
Behavior of the Python Extension Loader can be controlled for each component with the following settings. Remember, default settings for all AI Hub components are picked in such a way, that these components automatically install environments and leverage PEL's capability. Expected behavior for the full standard AI Hub installation differs from this!
Setting | Description | AI Hub default | Job/Web API/Scoring Agent default |
---|---|---|---|
PYSDK_PEL_DIST_LOC |
Location of Python environments | Not set. Depends on your Python setup. Defaults to Miniforge's location of environments. | Not set. Depends on your Python setup. Defaults to Miniforge's location of environments. |
PYSDK_PEL_DISABLE_MINIFORGE |
Disable Miniforge which manages installation of Python environments. | true |
false |
PYSDK_PEL_FORCE_SYNCHRONOUS_LOADING |
Determines how Python environments are loaded (synchronously, one at a time, or in parallel, recommended to keep default). | true |
true |
PYSDK_PEL_SKIP_DIST_REGISTRATION |
Skips loading and checks of Python environments. Useful for components which only need to show available Operators from the extensions, but not use them for execution. | true |
false |