SWITCH: An Exemplar for Evaluating Self-Adaptive ML-Enabled Systems

"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.

Getting started

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.

Requirements:

Installation

Video for steps of installation and running the application can be found at:

  1. Youtube
  2. Google Drive

Clone the GitHub repository:

            
git clone https://github.com/sa4s-serc/switch
cd SWITCH
            
            
        

  1. Setting up Elastic Search and Kibana
  2. 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.

  3. Setting up Virtual Environment (optional)
  4. Using virtualenv allows you to avoid installing Python packages globally.

                
    python3 -m venv ./venv
    source venv/bin/activate
                
                
            

  5. Installation (only one is required)
  6. Installation using setup.sh

                
    chmod +x setup.sh
    ./setup.sh
                
                
            

    OR