Skip to content

3.5 Adding a new adapter

pdotter edited this page Feb 7, 2024 · 21 revisions

Adding a new Adapter

This guide is explaining how to add a new Adapter. It will be describe how we added h2o as a new AutoML solution to OMA-ML. As a first step copy another Adapter and rename it for your specific solution. *filename means YOUR_AUTOMLfilename.

Testing the AutoML solution

First we created a running docker container. H2O has a test run to check whether everything is working. You can just replace the code of main() in *Server.py by some test code. This way you can check easily whether all dependencies are satisfied and the container is working fine and confirm the AutoML-Solution is running at all before adjusting the controller etc. Obviously you can also do it by using the .venv. Add the requirements to the requirements.txt.

Changes to the adapter folders

Setup Ports

In /adapters/YOUR_AUTOML/.vscode/launch.json you have to change the GRPC_SERVER_PORT. Add a new *_SERVICE_HOST and _SERVICE_PORT to /controller/.vscode/launch.json. For the docker environment you have to add the same values to the controller environment variables in the docker-compose.yml. Add ":your_automl": [_SERVICE_HOST, *_SERVICE_PORT] to self.__automl_addresses in AdapterRuntimeManager.py and AdapterRuntimeExplainerDashboardManager.py

Updating the Ontology

Activate in AutoML_solution: Already existing entry set supported_by_oma_ml to true Add Configuration parameters (with version and description) in ML_Ontology and create a new sheet (H20_config) (for the new TTL file). Check usability of Configuration parameters Setup Configuration parameters

Updating the controller

Update AdapterRuntimeExplainerDashboardManager.py, AdapterRuntimeManager and AdapterExplainerDashboardManager.py: add new url/port

Updating the docker-compose.yml

Add a new service entry for the adapter in docker-compose.yml

Also, adjust the VS Code launch.json from Controller and H2O (localhost and next port).