This repository demonstrates how to offload artificial intelligence (AI) workloads across distributed systems using active storage architectures. It leverages dataClay and Docker to orchestrate and manage model training across a client-server infrastructure.
The dataset used in this repository is publicly available on Hugging Face:
🧠 Memory Usage Benchmark: This chart compares memory consumption across different configurations using and not using dataClay (a distributed data management system)
⏱️ Runtimes benchmark: This chart visualizes the total execution time across baseline (an Edge device, e.g. OrangePI, a Mac) and offloaded (dataClay) setups (A high compute device).
To train a model on the server using dataClay:
-
Open
train_dataclay.py
and set the correctserver_ip
. -
Ensure Docker Compose is up and running:
docker-compose up -d
-
Define two experiment names:
client_experiment
for storing client results.experiment_name
for storing server results.
-
Run the training notebook:
./AIoffload/0_server_experiment.ipynb
For standalone (non-dataClay) experiments:
- Open the notebook:
./Baseline/1_client_experiment.ipynb
- Set
experiment_name
to track and store metrics and results.
You'll need to configure both the server and client environments.
- Install Miniconda:
-
For Linux:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh
-
For macOS:
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh bash Miniconda3-latest-MacOSX-x86_64.sh
- Initialize Conda:
source ~/miniconda3/bin/activate
conda init
Then restart your terminal.
- Create and activate the server environment:
conda create -n server_env python=3.10.16 -y
conda activate server_env
- Clone the repository and install dependencies:
git clone <repository_url>
cd <repository_directory>
pip install -r requirements.txt
Make sure
torch
is included (add a specific CUDA version if needed).
- Start Docker + dataClay:
docker-compose down
docker-compose up -d
-
Install Miniconda (same steps as server).
-
Create and activate the client environment:
conda create -n client_env python=3.10.16 -y
conda activate client_env
- Clone the repository and install dependencies:
git clone <repository_url>
cd <repository_directory>
pip install -r requirements-client.txt
torch
in client requirements if unnecessary.
- Install Jupyter Notebook:
conda install -c conda-forge notebook
- Launch Jupyter:
jupyter-notebook
🇪🇺 This work has received funding from the European Union’s HORIZON research and innovation programme under grant agreement No. 101070177.