by authors
This git shows the codes, graphs, and plots of our tutorial, which has been submitted for publication in SBRC 2024 and NetSoft 2024. You will have access to the Python codes we have used to generate our methodology.
This tutorial explores the application of Time Series GAN in a Programmable Data Plane for enhancing Reinforcement Learning within the context of computer networks, particularly in video applications. We address various challenges, including dataset augmentation, balancing, and extended RL training times in real setups. By leveraging synthetic data generated by TimeGAN, we accelerate experimentation, enhance dataset diversity, and simplify RL model training, ultimately evaluating TimeGAN's performance against real setups in resource optimization for PDPs using an RL agent. This research contributes by directly comparing GAN usage and real setups, bridging a gap in computer network literature, and highlighting a 99% similarity in Quality of Service achieved by an RL model trained with synthetic data, affirming TimeGAN's potential as a valuable simulator without compromising RL training efficacy.
All source code used to generate the results and figures in the paper are in
the code
folder.
The datasets used in this study is provided in datasets
.
Figures of the results generated by the code are saved in results
.
You can download a copy of all the files in this repository by cloning the git repository:
https://github.com/thiagocaproni/tutorial_timegan.git
You'll need Python 3.9.16 to run the code.
You can set up an environment with all dependencies using an environment manager
like Anaconda Python distribution which
provides the conda
package manager.
Anaconda can be installed in your user directory and does not interfere with
the system Python installation.
The required dependencies are specified in the file environment.yml
.
Run the following command in the repository folder (where environment.yml
is located) to create a separate environment and install all required
dependencies in it:
conda env create
You can find the datasets used in this work in datasets
folder.
Activate the conda environment:
conda activate ydata
or, on Windows:
activate ydata
To build and produce all results and figures, follow these steps:
The training scripts are in code/timegan/train
. In this folder there are two scripts: timegan32.py
and timegan64.py
. As detailed in our paper, we generated synthetic data for two different PDP scenarios: 32 and 64 packets in switch buffers.
The script to generate synthetic data is in code/timegan/data_generation/generate_synth_data.py
.
The script for the evaluation and model selection is in code/timegan/evaluation/analyze_data_models.ipynb
. You can also find the regressor and PCA / t-SNE analyses in code/timegan/regressor/
folder.
All source code is made available under a BSD 3-clause license. You can freely use and modify the code, without warranty, so long as you provide attribution to the authors.