"SWITCH" is an exemplar developed to enhance self-adaptive capabilities in Machine Learning-Enabled Systems through dynamic model switching at runtime. It is designed as a comprehensive web service, catering to a broad range of ML scenarios, with its implementation demonstrated through an object detection use case.
The system comprises distinct components, including a frontend written in React, a backend powered by FAST API in Python, and Elasticsearch serving as the database. We will be using YOLOv5u as the object detection model.
Video for steps of installation and running the application can be found at:
Clone the GitHub repository:
git clone https://github.com/sa4s-serc/switch
cd SWITCH
Start the docker engine on your system.
Start Elasticsearch and Kibana containers using Docker Compose with image version 7.9.1, using the command:
docker-compose up
Wait until ready; this may take time to install depending on the internet connection.
You can check if it's ready by accessing Elasticsearch at http://localhost:9200/ and Kibana at http://localhost:5601/.
Leave the Docker container running. Use a different terminal for the rest of the steps.
Using virtualenv allows you to avoid installing Python packages globally.
python3 -m venv ./venv
source venv/bin/activate
chmod +x setup.sh
./setup.sh
curl -X POST "http://localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@export.ndjson
npm install
cd NAVIE
pip install -r requirements.txt
python3 process_model.py